Package com.caucho.hessian.mux
Class MuxInputStream
java.lang.Object
java.io.InputStream
com.caucho.hessian.mux.MuxInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Input stream to a specific channel.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Complete writing to the stream, closing the channel.intGets the channel of the connection.protected InputStreamGets the raw input stream.getURL()Returns the request's URLprotected voidInitialize the multiplexor with input and output streams.intread()Writes a data byte to the output stream.protected voidreadTag(int tag) Subclasses will extend this to read values.protected StringreadUTF()Reads a UTF-8 string.Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
is
-
-
Constructor Details
-
MuxInputStream
public MuxInputStream()Null argument constructor.
-
-
Method Details
-
init
Initialize the multiplexor with input and output streams.- Throws:
IOException
-
getInputStream
Gets the raw input stream. Clients will normally not call this.- Throws:
IOException
-
getChannel
public int getChannel()Gets the channel of the connection. -
getURL
Returns the request's URL -
read
Writes a data byte to the output stream.- Specified by:
readin classInputStream- Throws:
IOException
-
close
Complete writing to the stream, closing the channel.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
readTag
Subclasses will extend this to read values.- Throws:
IOException
-
readUTF
Reads a UTF-8 string.- Returns:
- the utf-8 encoded string
- Throws:
IOException
-