Class RpcRshInputStream
java.lang.Object
java.io.InputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcRshInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Implements the lowest level of the P4Java RPC 'rsh' input 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
ConstructorsConstructorDescriptionRpcRshInputStream(InputStream inputstream, ServerStats stats) Construct a suitable stream for the passed-in inputstream. -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()protected InputStreamvoidmark(int readlimit) booleanintread()intread(byte[] bytes) intread(byte[] bytes, int offset, int len) voidreset()protected voidsetRshStream(InputStream rshStream) longskip(long n) toString()Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
TRACE_PREFIX
- See Also:
-
-
Constructor Details
-
RpcRshInputStream
Construct a suitable stream for the passed-in inputstream. No assumptions are made about the passed-in inputstream except that a) it's not null, and b) it's been initialized and set up for reading by the caller.- Parameters:
inputstream- non-null InputStreamstats- non-null ServerStats
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
toString
-
getRshStream
-
setRshStream
-