|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.Socket
edu.emory.mathcs.util.net.SocketWrapper
edu.emory.mathcs.util.net.compressed.CompressedSocketWrapper
Socket wrappper that enables data compression over an established socket connection. The output stream associated with this socket guarantees that flush sends out all the data that has been written so far. Hence, this kind of socket can be used as a transport for request-response-based protocols, like RMI or RPC.
CompressedOutputStream
Field Summary | |
protected int |
bufSize
Buffer size used for compression/decompression. |
Fields inherited from class edu.emory.mathcs.util.net.SocketWrapper |
delegate |
Constructor Summary | |
CompressedSocketWrapper(java.net.Socket delegate)
Creates new compression wrapper over an existing, bound socket. |
|
CompressedSocketWrapper(java.net.Socket delegate,
int bufSize)
Creates new compression wrapper over an existing, bound socket, using specified buffer size for compression/decompression. |
Method Summary | |
java.net.Socket |
getBaseSocket()
Returns the base socket wrapped by this socket. |
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
Methods inherited from class edu.emory.mathcs.util.net.SocketWrapper |
equals, getChannel, hashCode, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown |
Methods inherited from class java.net.Socket |
bind, close, connect, connect, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final int bufSize
Constructor Detail |
public CompressedSocketWrapper(java.net.Socket delegate) throws java.net.SocketException
delegate
- the socket to enable compression for
java.net.SocketException
- if a socket exception occurspublic CompressedSocketWrapper(java.net.Socket delegate, int bufSize) throws java.net.SocketException
delegate
- the socket to enable compression forbufSize
- buffer size used for compression/decompression
java.net.SocketException
- if a socket exception occursMethod Detail |
public java.net.Socket getBaseSocket()
DecoratingSocket
getBaseSocket
in interface DecoratingSocket
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |