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 TypeMethodDescriptionvoid
close()
Complete writing to the stream, closing the channel.int
Gets the channel of the connection.protected InputStream
Gets the raw input stream.getURL()
Returns the request's URLprotected void
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 String
readUTF()
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:
read
in classInputStream
- Throws:
IOException
-
close
Complete writing to the stream, closing the channel.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in 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
-