Class RpcRshOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.perforce.p4java.impl.mapbased.rpc.stream.RpcRshOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class RpcRshOutputStream extends java.io.OutputStreamImplements 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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTRACE_PREFIX
-
Constructor Summary
Constructors Constructor Description RpcRshOutputStream(java.io.OutputStream outputstream, ServerStats stats)Construct a suitable stream for the passed-in inputstream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()protected java.io.OutputStreamgetRshStream()protected voidsetRshStream(java.io.OutputStream rshStream)java.lang.StringtoString()voidwrite(byte[] bytes)voidwrite(byte[] bytes, int offset, int len)voidwrite(int b)
-
-
-
Field Detail
-
TRACE_PREFIX
public static final java.lang.String TRACE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RpcRshOutputStream
public RpcRshOutputStream(java.io.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
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] bytes) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] bytes, int offset, int len) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- 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.OutputStream- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getRshStream
protected java.io.OutputStream getRshStream()
-
setRshStream
protected void setRshStream(java.io.OutputStream rshStream)
-
-