com.caucho.hessian.mux

Class MuxInputStream


public class MuxInputStream
extends InputStream

Input stream to a specific channel.

Field Summary

private int
channel
private int
chunkLength
protected InputStream
is
private MuxServer
server
private String
url

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 InputStream
getInputStream()
Gets the raw input stream.
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.
(package private) void
readToData(boolean returnOnYield)
Reads tags, until getting data.
protected String
readUTF()
Reads a UTF-8 string.
(package private) void
setInputStream(InputStream is)
private void
skipToEnd()
Skips data until the end of the channel.

Field Details

channel

private int channel

chunkLength

private int chunkLength

is

protected InputStream is

server

private MuxServer server

url

private String url

Constructor Details

MuxInputStream

public MuxInputStream()
Null argument constructor.

Method Details

close

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

getChannel

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

getInputStream

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

getURL

public String getURL()
Returns the request's URL

init

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

read

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

readTag

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

readToData

(package private)  void readToData(boolean returnOnYield)
            throws IOException
Reads tags, until getting data.

readUTF

protected String readUTF()
            throws IOException
Reads a UTF-8 string.
Returns:
the utf-8 encoded string

setInputStream

(package private)  void setInputStream(InputStream is)

skipToEnd

private void skipToEnd()
            throws IOException
Skips data until the end of the channel.