|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.net.Socket
org.sapia.ubik.net.mplex.MultiplexSocket
public class MultiplexSocket
The MultiplesSocket is the implementation of client socket that is
used in Ubik's multiplex logic. It extends the traditionnal Socket
of the java.net package to add a read-ahead functionality on the
input stream of the socket.
This class has the following limitation were a maximum number of bytes that
can be read in advanced and put back in the input stream of the socket has to
be set when creating a new MultiplexSocket instance.
| Constructor Summary | |
|---|---|
MultiplexSocket(java.net.SocketImpl impl,
int bufferSize)
Creates a new MultiplexSocket instance. |
|
| Method Summary | |
|---|---|
java.io.InputStream |
getInputStream()
Returns the input stream of this socket. |
java.io.PushbackInputStream |
getPushbackInputStream()
Returns the input stream of this socket as a PushbackInputStream. |
java.lang.String |
toString()
Returns the implementation address and implementation port of this socket as a String. |
| Methods inherited from class java.net.Socket |
|---|
bind, close, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultiplexSocket(java.net.SocketImpl impl,
int bufferSize)
throws java.net.SocketException
impl - The socket impl to use.bufferSize - The maximum read-ahead buffer size.
java.net.SocketException - If an error occurs with the socket impl.| Method Detail |
|---|
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.Socketjava.io.IOException - If an I/O error occurs when creating the input stream,
the socket is closed, the socket is not connected, or the socket
input has been shutdown using Socket.shutdownInput().
public java.io.PushbackInputStream getPushbackInputStream()
throws java.io.IOException
PushbackInputStream.
PushbackInputStream.
java.io.IOExceptionpublic java.lang.String toString()
String.
toString in class java.net.Socket
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||