public class RpcSocketInputStream extends 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 String |
TRACE_PREFIX |
Constructor and Description |
---|
RpcSocketInputStream(Socket socket,
ServerStats stats)
Construct a suitable stream for the passed-in socket.
|
Modifier and Type | Method and Description |
---|---|
protected Socket |
getSocket() |
protected InputStream |
getSockStream() |
int |
read() |
int |
read(byte[] bytes) |
int |
read(byte[] bytes,
int offset,
int len) |
protected void |
setSocket(Socket socket) |
protected void |
setSockStream(InputStream sockStream) |
available, close, mark, markSupported, reset, skip
public static final String TRACE_PREFIX
public RpcSocketInputStream(Socket socket, ServerStats stats)
socket
- non-null socketpublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] bytes) throws IOException
read
in class InputStream
IOException
public int read(byte[] bytes, int offset, int len) throws IOException
read
in class InputStream
IOException
protected Socket getSocket()
protected void setSocket(Socket socket)
protected InputStream getSockStream()
protected void setSockStream(InputStream sockStream)
Copyright © 2017 Perforce Software. All Rights Reserved.