Class RpcSocketInputStream
java.lang.Object
java.io.InputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcSocketInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRpcSocketInputStream(Socket socket, ServerStats stats) Construct a suitable stream for the passed-in socket. -
Method Summary
Modifier and TypeMethodDescriptionprotected Socketprotected InputStreamintread()intread(byte[] bytes) intread(byte[] bytes, int offset, int len) protected voidprotected voidsetSockStream(InputStream sockStream) Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
TRACE_PREFIX
- See Also:
-
-
Constructor Details
-
RpcSocketInputStream
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 socketstats- stats
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
getSocket
-
setSocket
-
getSockStream
-
setSockStream
-