public abstract class AbstractSocketWrapper
extends java.net.Socket
Constructor and Description |
---|
AbstractSocketWrapper(java.net.Socket socket) |
Modifier and Type | Method and Description |
---|---|
void |
bind(java.net.SocketAddress bindpoint) |
protected void |
checkCancel() |
void |
close() |
void |
connect(java.net.SocketAddress endpoint) |
void |
connect(java.net.SocketAddress endpoint,
int timeout) |
boolean |
equals(java.lang.Object obj) |
java.net.InetAddress |
getInetAddress() |
java.io.InputStream |
getInputStream() |
boolean |
getKeepAlive() |
java.net.InetAddress |
getLocalAddress() |
int |
getLocalPort() |
java.net.SocketAddress |
getLocalSocketAddress() |
boolean |
getOOBInline() |
java.io.OutputStream |
getOutputStream() |
int |
getPort() |
int |
getReceiveBufferSize() |
java.net.SocketAddress |
getRemoteSocketAddress() |
boolean |
getReuseAddress() |
int |
getSendBufferSize() |
java.net.Socket |
getSocket() |
int |
getSoLinger() |
int |
getSoTimeout() |
boolean |
getTcpNoDelay() |
int |
getTrafficClass() |
int |
hashCode() |
boolean |
isBound() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
isInputShutdown() |
boolean |
isOutputShutdown() |
void |
sendUrgentData(int data) |
void |
setKeepAlive(boolean on) |
void |
setOOBInline(boolean on) |
void |
setReceiveBufferSize(int size) |
void |
setReuseAddress(boolean on) |
void |
setSendBufferSize(int size) |
void |
setSoLinger(boolean on,
int linger) |
void |
setSoTimeout(int timeout) |
void |
setTcpNoDelay(boolean on) |
void |
setTrafficClass(int tc) |
void |
shutdownInput() |
void |
shutdownOutput() |
java.lang.String |
toString() |
public AbstractSocketWrapper(java.net.Socket socket)
socket
- for the wrapperprotected void checkCancel() throws java.io.IOException
java.io.IOException
- if some problempublic java.net.Socket getSocket()
public void bind(java.net.SocketAddress bindpoint) throws java.io.IOException
bind
in class java.net.Socket
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.net.Socket
java.io.IOException
public void connect(java.net.SocketAddress endpoint, int timeout) throws java.io.IOException
connect
in class java.net.Socket
java.io.IOException
public void connect(java.net.SocketAddress endpoint) throws java.io.IOException
connect
in class java.net.Socket
java.io.IOException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.net.InetAddress getInetAddress()
getInetAddress
in class java.net.Socket
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class java.net.Socket
java.io.IOException
public boolean getKeepAlive() throws java.net.SocketException
getKeepAlive
in class java.net.Socket
java.net.SocketException
public java.net.InetAddress getLocalAddress()
getLocalAddress
in class java.net.Socket
public int getLocalPort()
getLocalPort
in class java.net.Socket
public java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress
in class java.net.Socket
public boolean getOOBInline() throws java.net.SocketException
getOOBInline
in class java.net.Socket
java.net.SocketException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in class java.net.Socket
java.io.IOException
public int getPort()
getPort
in class java.net.Socket
public int getReceiveBufferSize() throws java.net.SocketException
getReceiveBufferSize
in class java.net.Socket
java.net.SocketException
public java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress
in class java.net.Socket
public boolean getReuseAddress() throws java.net.SocketException
getReuseAddress
in class java.net.Socket
java.net.SocketException
public int getSendBufferSize() throws java.net.SocketException
getSendBufferSize
in class java.net.Socket
java.net.SocketException
public int getSoLinger() throws java.net.SocketException
getSoLinger
in class java.net.Socket
java.net.SocketException
public int getSoTimeout() throws java.net.SocketException
getSoTimeout
in class java.net.Socket
java.net.SocketException
public boolean getTcpNoDelay() throws java.net.SocketException
getTcpNoDelay
in class java.net.Socket
java.net.SocketException
public int getTrafficClass() throws java.net.SocketException
getTrafficClass
in class java.net.Socket
java.net.SocketException
public int hashCode()
hashCode
in class java.lang.Object
public boolean isBound()
isBound
in class java.net.Socket
public boolean isClosed()
isClosed
in class java.net.Socket
public boolean isConnected()
isConnected
in class java.net.Socket
public boolean isInputShutdown()
isInputShutdown
in class java.net.Socket
public boolean isOutputShutdown()
isOutputShutdown
in class java.net.Socket
public void sendUrgentData(int data) throws java.io.IOException
sendUrgentData
in class java.net.Socket
java.io.IOException
public void setKeepAlive(boolean on) throws java.net.SocketException
setKeepAlive
in class java.net.Socket
java.net.SocketException
public void setOOBInline(boolean on) throws java.net.SocketException
setOOBInline
in class java.net.Socket
java.net.SocketException
public void setReceiveBufferSize(int size) throws java.net.SocketException
setReceiveBufferSize
in class java.net.Socket
java.net.SocketException
public void setReuseAddress(boolean on) throws java.net.SocketException
setReuseAddress
in class java.net.Socket
java.net.SocketException
public void setSendBufferSize(int size) throws java.net.SocketException
setSendBufferSize
in class java.net.Socket
java.net.SocketException
public void setSoLinger(boolean on, int linger) throws java.net.SocketException
setSoLinger
in class java.net.Socket
java.net.SocketException
public void setSoTimeout(int timeout) throws java.net.SocketException
setSoTimeout
in class java.net.Socket
java.net.SocketException
public void setTcpNoDelay(boolean on) throws java.net.SocketException
setTcpNoDelay
in class java.net.Socket
java.net.SocketException
public void setTrafficClass(int tc) throws java.net.SocketException
setTrafficClass
in class java.net.Socket
java.net.SocketException
public void shutdownInput() throws java.io.IOException
shutdownInput
in class java.net.Socket
java.io.IOException
public void shutdownOutput() throws java.io.IOException
shutdownOutput
in class java.net.Socket
java.io.IOException
public java.lang.String toString()
toString
in class java.net.Socket