|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.jboss.remoting.transport.multiplex.utility.GrowablePipedInputStream
org.jboss.remoting.transport.multiplex.MultiplexingInputStream
public class MultiplexingInputStream
MultiplexingInputStream
is the class returned by
VirtualSocket.getInputStream()
.
It supports the methods and behavior implemented by the InputStream
returned by
java.net.Socket.getInputStream()
. For more information about the behavior
of the methods, see the javadoc for java.io.InputStream
.
Copyright (c) 2005
Field Summary | |
---|---|
protected static org.jboss.logging.Logger |
log
|
Constructor Summary | |
---|---|
MultiplexingInputStream(GrowablePipedOutputStream sourceStream,
MultiplexingManager manager)
|
|
MultiplexingInputStream(GrowablePipedOutputStream sourceStream,
MultiplexingManager manager,
VirtualSocket socket)
|
|
MultiplexingInputStream(GrowablePipedOutputStream sourceStream,
MultiplexingManager manager,
VirtualSocket socket,
VirtualSelector virtualSelector)
|
Method Summary | |
---|---|
void |
close()
See superclass javadoc. |
protected VirtualSocket |
getSocket()
|
protected void |
handleRemoteShutdown()
handleRemoteShutdown() is responsible for informing the MultiplexingInputStream
that no more bytes will be coming from the remote MultiplexingOutputStream to which
it is connected, because shutdownOutput() or close() has been called on the
remote VirtualSocket . |
protected void |
interruptReadingThreads()
|
int |
read()
See superclass javadoc. |
int |
read(byte[] bytes)
See superclass javadoc. |
int |
read(byte[] bytes,
int off,
int len)
See superclass javadoc. |
int |
readInt()
readInt() is borrowed from DataInputStream. |
protected void |
setEOF()
|
protected void |
setReadException(java.io.IOException e)
|
protected void |
setSkip(long n)
|
protected void |
setSocket(VirtualSocket socket)
A MultiplexingInputStream may be created without reference to a VirtualSocket. |
long |
skip(long n)
See superclass javadoc. |
Methods inherited from class org.jboss.remoting.transport.multiplex.utility.GrowablePipedInputStream |
---|
available, connect, getTimeout, isConnected, receive, receive, receive, register, setTimeout |
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.jboss.logging.Logger log
Constructor Detail |
---|
public MultiplexingInputStream(GrowablePipedOutputStream sourceStream, MultiplexingManager manager) throws java.io.IOException
sourceStream
- manager
-
java.io.IOException
public MultiplexingInputStream(GrowablePipedOutputStream sourceStream, MultiplexingManager manager, VirtualSocket socket) throws java.io.IOException
sourceStream
- manager
- socket
-
java.io.IOException
public MultiplexingInputStream(GrowablePipedOutputStream sourceStream, MultiplexingManager manager, VirtualSocket socket, VirtualSelector virtualSelector) throws java.io.IOException
sourceStream
- manager
- socket
- virtualSelector
-
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class GrowablePipedInputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class GrowablePipedInputStream
java.io.IOException
public int read(byte[] bytes) throws java.io.IOException
read
in class GrowablePipedInputStream
java.io.IOException
public int read(byte[] bytes, int off, int len) throws java.io.IOException
read
in class GrowablePipedInputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
protected VirtualSocket getSocket()
protected void handleRemoteShutdown() throws java.io.IOException
handleRemoteShutdown()
is responsible for informing the MultiplexingInputStream
that no more bytes will be coming from the remote MultiplexingOutputStream
to which
it is connected, because shutdownOutput()
or close()
has been called on the
remote VirtualSocket
. The result is that once all bytes sent by the remote socket have
been consumed, all subsequent calls to read() will return -1 and all subsequent calls to skip() will
return 0, indicating end of file has been reached.
java.io.IOException
protected void interruptReadingThreads()
public final int readInt() throws java.io.IOException
readInt()
is borrowed from DataInputStream. It saves the extra expense of
creating a DataInputStream
java.io.IOException
protected void setEOF()
protected void setReadException(java.io.IOException e)
protected void setSkip(long n)
n
- protected void setSocket(VirtualSocket socket)
socket
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |