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.InputStreamjava.io.IOExceptionpublic int read(byte[] bytes)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] bytes,
int offset,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic java.lang.String toString()
toString in class java.lang.Objectprotected java.io.InputStream getRshStream()
protected void setRshStream(java.io.InputStream rshStream)