com.perforce.p4java.impl.mapbased.rpc.stream
Class RpcSocketInputStream
java.lang.Object
java.io.InputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcSocketInputStream
- All Implemented Interfaces:
- Closeable
public class RpcSocketInputStream
- extends InputStream
Implements the lowest level of the P4Java RPC input socket stream architecture.
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRACE_PREFIX
public static final String TRACE_PREFIX
- See Also:
- Constant Field Values
RpcSocketInputStream
public RpcSocketInputStream(Socket socket,
ServerStats stats)
- Construct a suitable stream for the passed-in socket. No assumptions
are made about the passed-in socket except that a) it's not null, and
b) it's been initialized and set up for reading (or at least the successful
retrieval of a suitable input stream) by the caller.
- Parameters:
socket
- non-null socket
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] bytes)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] bytes,
int offset,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
getSocket
protected Socket getSocket()
setSocket
protected void setSocket(Socket socket)
getSockStream
protected InputStream getSockStream()
setSockStream
protected void setSockStream(InputStream sockStream)
Copyright © 2015 Perforce Software. All Rights Reserved.