public class RpcSocketOutputStream extends 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 String |
TRACE_PREFIX |
| Constructor and Description |
|---|
RpcSocketOutputStream(Socket socket,
ServerStats stats)
Construct a suitable stream for the passed-in socket.
|
| Modifier and Type | Method and Description |
|---|---|
protected Socket |
getSocket() |
protected OutputStream |
getSocketStream() |
protected void |
setSocket(Socket socket) |
protected void |
setSocketStream(OutputStream socketStream) |
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int offset,
int len) |
void |
write(int b) |
close, flushpublic static final String TRACE_PREFIX
public RpcSocketOutputStream(Socket socket, ServerStats stats)
socket - non-null socketpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] bytes)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] bytes,
int offset,
int len)
throws IOException
write in class OutputStreamIOExceptionprotected Socket getSocket()
protected void setSocket(Socket socket)
protected OutputStream getSocketStream()
protected void setSocketStream(OutputStream socketStream)
Copyright © 2017 Perforce Software. All Rights Reserved.