com.perforce.p4java.impl.mapbased.rpc.stream
Class RpcRshOutputStream
java.lang.Object
java.io.OutputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcRshOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class RpcRshOutputStream
- extends OutputStream
Implements the lowest level of the P4Java RPC 'rsh' output stream architecture.
This class does the most basic conversion of outgoing bytes to the (TCP/IP)
wire from a Java IO output stream whose contents have been encoded upstream.
TRACE_PREFIX
public static final String TRACE_PREFIX
- See Also:
- Constant Field Values
RpcRshOutputStream
public RpcRshOutputStream(OutputStream outputstream,
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:
outputstream
- non-null OutputStreamstats
- non-null ServerStats
write
public void write(int b)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] bytes)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] bytes,
int offset,
int len)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class OutputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class OutputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
getRshStream
protected OutputStream getRshStream()
setRshStream
protected void setRshStream(OutputStream rshStream)
Copyright © 2015 Perforce Software. All Rights Reserved.