com.perforce.p4java.impl.mapbased.rpc.stream
Class RpcRshInputStream
java.lang.Object
java.io.InputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcRshInputStream
- All Implemented Interfaces:
- Closeable
public class RpcRshInputStream
- extends InputStream
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.
TRACE_PREFIX
public static final String TRACE_PREFIX
- See Also:
- Constant Field Values
RpcRshInputStream
public RpcRshInputStream(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
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
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
mark
public void mark(int readlimit)
- Overrides:
mark
in class InputStream
reset
public void reset()
throws IOException
- Overrides:
reset
in class InputStream
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class InputStream
toString
public String toString()
- Overrides:
toString
in class Object
getRshStream
protected InputStream getRshStream()
setRshStream
protected void setRshStream(InputStream rshStream)
Copyright © 2015 Perforce Software. All Rights Reserved.