public class RpcSocketOutputStream
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 |
|---|
RpcSocketOutputStream(java.net.Socket socket,
ServerStats stats)
Construct a suitable stream for the passed-in socket.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.net.Socket |
getSocket() |
protected java.io.OutputStream |
getSocketStream() |
protected void |
setSocket(java.net.Socket socket) |
protected void |
setSocketStream(java.io.OutputStream socketStream) |
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 RpcSocketOutputStream(java.net.Socket socket,
ServerStats stats)
socket - non-null socketpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] bytes)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] bytes,
int offset,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionprotected java.net.Socket getSocket()
protected void setSocket(java.net.Socket socket)
protected java.io.OutputStream getSocketStream()
protected void setSocketStream(java.io.OutputStream socketStream)
Copyright © 2021 Perforce Software. All Rights Reserved.