Class RpcRshInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.perforce.p4java.impl.mapbased.rpc.stream.RpcRshInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class RpcRshInputStream extends java.io.InputStreamImplements 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 Modifier and Type Field Description static java.lang.StringTRACE_PREFIX
-
Constructor Summary
Constructors Constructor Description RpcRshInputStream(java.io.InputStream inputstream, ServerStats stats)Construct a suitable stream for the passed-in inputstream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()protected java.io.InputStreamgetRshStream()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] bytes)intread(byte[] bytes, int offset, int len)voidreset()protected voidsetRshStream(java.io.InputStream rshStream)longskip(long n)java.lang.StringtoString()
-
-
-
Field Detail
-
TRACE_PREFIX
public static final java.lang.String TRACE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RpcRshInputStream
public RpcRshInputStream(java.io.InputStream inputstream, ServerStats stats)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 Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] bytes) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] bytes, int offset, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.InputStream
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getRshStream
protected java.io.InputStream getRshStream()
-
setRshStream
protected void setRshStream(java.io.InputStream rshStream)
-
-