org.jboss.remoting.transport.multiplex
Class MultiplexingInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.jboss.remoting.transport.multiplex.utility.GrowablePipedInputStream
          extended byorg.jboss.remoting.transport.multiplex.MultiplexingInputStream

public class MultiplexingInputStream
extends GrowablePipedInputStream

Copyright (c) 2005

Author:
Ron Sigal

Field Summary
protected static org.jboss.logging.Logger log
           
 
Constructor Summary
MultiplexingInputStream(GrowablePipedOutputStream sourceStream, MultiplexingManager manager, VirtualSocket socket)
           
 
Method Summary
 void close()
           
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()
          FIXME Comment this
 int read()
           
 int read(byte[] bytes)
           
 int read(byte[] bytes, int off, int len)
           
protected  void setEOF()
           
protected  void setSkip(long n)
          FIXME Comment this
 long skip(long n)
           
 
Methods inherited from class org.jboss.remoting.transport.multiplex.utility.GrowablePipedInputStream
available, connect, getTimeout, isConnected, receive, receive, receive, 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

log

protected static final org.jboss.logging.Logger log
Constructor Detail

MultiplexingInputStream

public MultiplexingInputStream(GrowablePipedOutputStream sourceStream,
                               MultiplexingManager manager,
                               VirtualSocket socket)
                        throws java.io.IOException
Parameters:
manager - TODO
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Overrides:
read in class GrowablePipedInputStream
Throws:
java.io.IOException

read

public int read(byte[] bytes)
         throws java.io.IOException
Overrides:
read in class GrowablePipedInputStream
Throws:
java.io.IOException

read

public int read(byte[] bytes,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class GrowablePipedInputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Throws:
java.io.IOException

handleRemoteShutdown

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.

Throws:
java.io.IOException

interruptReadingThreads

protected void interruptReadingThreads()
FIXME Comment this


setEOF

protected void setEOF()

setSkip

protected void setSkip(long n)
FIXME Comment this

Parameters:
n -


Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.