public class OtpSocketTransport extends java.lang.Object implements OtpTransport
Constructor and Description |
---|
OtpSocketTransport(java.net.InetAddress addr,
int port) |
OtpSocketTransport(java.net.Socket s)
Socket wrapping constructor
|
OtpSocketTransport(java.lang.String addr,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream() |
public OtpSocketTransport(java.lang.String addr, int port) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
Socket.Socket(String, int)
public OtpSocketTransport(java.net.InetAddress addr, int port) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
Socket.Socket(InetAddress, int)
public OtpSocketTransport(java.net.Socket s)
s
- socket to wrappublic java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface OtpTransport
java.io.IOException
Socket.getInputStream()
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface OtpTransport
java.io.IOException
Socket.getOutputStream()
public void close() throws java.io.IOException
close
in interface OtpTransport
java.io.IOException
Socket.close()