com.caucho.hessian.mux
Class MuxInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.caucho.hessian.mux.MuxInputStream
All Implemented Interfaces:
java.io.Closeable

public class MuxInputStream
extends java.io.InputStream

Input stream to a specific channel.


Field Summary
protected  java.io.InputStream is
           
 
Constructor Summary
MuxInputStream()
          Null argument constructor.
 
Method Summary
 void close()
          Complete writing to the stream, closing the channel.
 int getChannel()
          Gets the channel of the connection.
protected  java.io.InputStream getInputStream()
          Gets the raw input stream.
 java.lang.String getURL()
          Returns the request's URL
protected  void init(MuxServer server, int channel)
          Initialize the multiplexor with input and output streams.
 int read()
          Writes a data byte to the output stream.
protected  void readTag(int tag)
          Subclasses will extend this to read values.
protected  java.lang.String readUTF()
          Reads a UTF-8 string.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

is

protected java.io.InputStream is
Constructor Detail

MuxInputStream

public MuxInputStream()
Null argument constructor.

Method Detail

init

protected void init(MuxServer server,
                    int channel)
             throws java.io.IOException
Initialize the multiplexor with input and output streams.

Throws:
java.io.IOException

getInputStream

protected java.io.InputStream getInputStream()
                                      throws java.io.IOException
Gets the raw input stream. Clients will normally not call this.

Throws:
java.io.IOException

getChannel

public int getChannel()
Gets the channel of the connection.


getURL

public java.lang.String getURL()
Returns the request's URL


read

public int read()
         throws java.io.IOException
Writes a data byte to the output stream.

Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Complete writing to the stream, closing the channel.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

readTag

protected void readTag(int tag)
                throws java.io.IOException
Subclasses will extend this to read values.

Throws:
java.io.IOException

readUTF

protected java.lang.String readUTF()
                            throws java.io.IOException
Reads a UTF-8 string.

Returns:
the utf-8 encoded string
Throws:
java.io.IOException