Closeable, AutoCloseablepublic class InternalSocket extends Socket
| Constructor | Description |
|---|---|
InternalSocket(int port) |
client side
|
InternalSocket(InputStream is,
OutputStream os) |
server side
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
bind(SocketAddress endpoint) |
Deprecated.
unsupported
|
void |
close() |
|
void |
connect(SocketAddress endpoint) |
Deprecated.
unsupported
|
void |
connect(SocketAddress endpoint,
int timeout) |
Deprecated.
unsupported
|
SocketChannel |
getChannel() |
Deprecated.
unsupported
|
InetAddress |
getInetAddress() |
Deprecated.
unsupported
|
InputStream |
getInputStream() |
|
boolean |
getKeepAlive() |
Deprecated.
unsupported
|
InetAddress |
getLocalAddress() |
Deprecated.
unsupported
|
int |
getLocalPort() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
SocketAddress |
getLocalSocketAddress() |
Deprecated.
unsupported
|
boolean |
getOOBInline() |
Deprecated.
unsupported
|
OutputStream |
getOutputStream() |
|
int |
getPort() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
int |
getReceiveBufferSize() |
Deprecated.
unsupported
|
SocketAddress |
getRemoteSocketAddress() |
Deprecated.
unsupported
|
boolean |
getReuseAddress() |
Deprecated.
unsupported
|
int |
getSendBufferSize() |
Deprecated.
unsupported
|
static Socket |
getSocket(String host,
int port) |
Convenience method to return either a Socket or an InternalSocket
|
int |
getSoLinger() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
int |
getSoTimeout() |
Always returns 0, even if setSoTimeout() was called.
|
boolean |
getTcpNoDelay() |
Deprecated.
unsupported
|
int |
getTrafficClass() |
Deprecated.
unsupported
|
boolean |
isBound() |
Deprecated.
unsupported
|
boolean |
isClosed() |
|
boolean |
isConnected() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
boolean |
isInputShutdown() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
boolean |
isOutputShutdown() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
void |
sendUrgentData(int data) |
Deprecated.
unsupported
|
(package private) void |
setInputStream(InputStream is) |
|
void |
setKeepAlive(boolean on) |
Deprecated.
unsupported
|
void |
setOOBInline(boolean on) |
Deprecated.
unsupported
|
(package private) void |
setOutputStream(OutputStream os) |
|
void |
setReceiveBufferSize(int size) |
Deprecated.
unsupported
|
void |
setReuseAddress(boolean on) |
Deprecated.
unsupported
|
void |
setSendBufferSize(int size) |
Deprecated.
unsupported
|
void |
setSoLinger(boolean on,
int linger) |
Does nothing as of 0.9.33, prior to that threw UnsupportedOperationException
|
void |
setSoTimeout(int timeout) |
Supported as of 0.9.34, if constructed with TimeoutPipedInputStream
and TimeoutPipedOutputStream.
|
void |
setTcpNoDelay(boolean on) |
Deprecated.
unsupported
|
void |
setTrafficClass(int cize) |
Deprecated.
unsupported
|
void |
shutdownInput() |
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
void |
shutdownOutput() |
Flushes (as the Socket javadocs advise) and closes.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOption, setOption, setPerformancePreferences, setSocketImplFactory, supportedOptionsInternalSocket(InputStream is, OutputStream os)
public InternalSocket(int port)
throws IOException
port - > 0IOExceptionpublic static Socket getSocket(String host, int port) throws IOException
port - > 0IOExceptionpublic InputStream getInputStream()
getInputStream in class Socketpublic OutputStream getOutputStream()
getOutputStream in class Socketvoid setInputStream(InputStream is)
void setOutputStream(OutputStream os)
public void close()
public void setSoTimeout(int timeout)
setSoTimeout in class SocketTimeoutPipedInputStreampublic int getSoTimeout()
getSoTimeout in class Socket@Deprecated public void bind(SocketAddress endpoint)
@Deprecated public void connect(SocketAddress endpoint)
@Deprecated public void connect(SocketAddress endpoint, int timeout)
@Deprecated public SocketChannel getChannel()
getChannel in class Socket@Deprecated public InetAddress getInetAddress()
getInetAddress in class Socket@Deprecated public boolean getKeepAlive()
getKeepAlive in class Socket@Deprecated public InetAddress getLocalAddress()
getLocalAddress in class Socketpublic int getLocalPort()
getLocalPort in class Socket@Deprecated public SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class Socket@Deprecated public boolean getOOBInline()
getOOBInline in class Socketpublic int getPort()
@Deprecated public int getReceiveBufferSize()
getReceiveBufferSize in class Socket@Deprecated public SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class Socket@Deprecated public boolean getReuseAddress()
getReuseAddress in class Socket@Deprecated public int getSendBufferSize()
getSendBufferSize in class Socketpublic int getSoLinger()
getSoLinger in class Socket@Deprecated public boolean getTcpNoDelay()
getTcpNoDelay in class Socket@Deprecated public int getTrafficClass()
getTrafficClass in class Socket@Deprecated public boolean isBound()
public boolean isConnected()
isConnected in class Socketpublic boolean isInputShutdown()
isInputShutdown in class Socketpublic boolean isOutputShutdown()
isOutputShutdown in class Socket@Deprecated public void sendUrgentData(int data)
sendUrgentData in class Socket@Deprecated public void setKeepAlive(boolean on)
setKeepAlive in class Socket@Deprecated public void setOOBInline(boolean on)
setOOBInline in class Socket@Deprecated public void setReceiveBufferSize(int size)
setReceiveBufferSize in class Socket@Deprecated public void setReuseAddress(boolean on)
setReuseAddress in class Socket@Deprecated public void setSendBufferSize(int size)
setSendBufferSize in class Socketpublic void setSoLinger(boolean on,
int linger)
setSoLinger in class Socket@Deprecated public void setTcpNoDelay(boolean on)
setTcpNoDelay in class Socket@Deprecated public void setTrafficClass(int cize)
setTrafficClass in class Socketpublic void shutdownInput()
throws IOException
shutdownInput in class SocketIOExceptionpublic void shutdownOutput()
throws IOException
shutdownOutput in class SocketIOException