public class InternalSocket extends Socket
| Constructor and Description |
|---|
InternalSocket(InputStream is,
OutputStream os)
server side
|
InternalSocket(int port)
client side
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InputStream |
getInputStream() |
int |
getLocalPort()
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
OutputStream |
getOutputStream() |
int |
getPort()
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
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 |
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
|
(package private) void |
setInputStream(InputStream is) |
(package private) void |
setOutputStream(OutputStream os) |
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 |
shutdownInput()
Supported as of 0.9.33, prior to that threw UnsupportedOperationException
|
void |
shutdownOutput()
Flushes (as the Socket javadocs advise) and closes.
|
String |
toString() |
bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalSocketAddress, getOOBInline, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getTcpNoDelay, getTrafficClass, isBound, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setTcpNoDelay, setTrafficClassInternalSocket(InputStream is, OutputStream os)
public InternalSocket(int port)
throws IOException
port - > 0IOExceptionpublic void close()
public InputStream getInputStream()
getInputStream in class Socketpublic int getLocalPort()
getLocalPort in class Socketpublic OutputStream getOutputStream()
getOutputStream in class Socketpublic int getPort()
public static Socket getSocket(String host, int port) throws IOException
port - > 0IOExceptionpublic int getSoLinger()
getSoLinger in class Socketpublic int getSoTimeout()
getSoTimeout in class Socketpublic boolean isConnected()
isConnected in class Socketpublic boolean isInputShutdown()
isInputShutdown in class Socketpublic boolean isOutputShutdown()
isOutputShutdown in class Socketvoid setInputStream(InputStream is)
void setOutputStream(OutputStream os)
public void setSoLinger(boolean on,
int linger)
setSoLinger in class Socketpublic void setSoTimeout(int timeout)
setSoTimeout in class SocketTimeoutPipedInputStreampublic void shutdownInput()
throws IOException
shutdownInput in class SocketIOExceptionpublic void shutdownOutput()
throws IOException
shutdownOutput in class SocketIOException