public class RpcRshOutputStream
extends java.io.OutputStream
This class does the most basic conversion of outgoing bytes to the (TCP/IP) wire from a Java IO output stream whose contents have been encoded upstream.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TRACE_PREFIX |
Constructor and Description |
---|
RpcRshOutputStream(java.io.OutputStream outputstream,
ServerStats stats)
Construct a suitable stream for the passed-in inputstream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected java.io.OutputStream |
getRshStream() |
protected void |
setRshStream(java.io.OutputStream rshStream) |
java.lang.String |
toString() |
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int offset,
int len) |
void |
write(int b) |
public static final java.lang.String TRACE_PREFIX
public RpcRshOutputStream(java.io.OutputStream outputstream, ServerStats stats)
outputstream
- non-null OutputStreamstats
- non-null ServerStatspublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] bytes) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] bytes, int offset, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
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.OutputStream
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
protected java.io.OutputStream getRshStream()
protected void setRshStream(java.io.OutputStream rshStream)