public class RpcRshInputStream
extends java.io.InputStream
This class does the most basic conversion from incoming bytes on the (TCP/IP) wire to a Java IO input stream whose contents are further decoded upstream.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TRACE_PREFIX |
Constructor and Description |
---|
RpcRshInputStream(java.io.InputStream inputstream,
ServerStats stats)
Construct a suitable stream for the passed-in inputstream.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
protected java.io.InputStream |
getRshStream() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] bytes) |
int |
read(byte[] bytes,
int offset,
int len) |
void |
reset() |
protected void |
setRshStream(java.io.InputStream rshStream) |
long |
skip(long n) |
java.lang.String |
toString() |
public static final java.lang.String TRACE_PREFIX
public RpcRshInputStream(java.io.InputStream inputstream, ServerStats stats)
inputstream
- non-null InputStreamstats
- non-null ServerStatspublic int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] bytes) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] bytes, int offset, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
public java.lang.String toString()
toString
in class java.lang.Object
protected java.io.InputStream getRshStream()
protected void setRshStream(java.io.InputStream rshStream)