Class RpcRshOutputStream
java.lang.Object
java.io.OutputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcRshOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRpcRshOutputStream(OutputStream outputstream, ServerStats stats) Construct a suitable stream for the passed-in inputstream. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()protected OutputStreamprotected voidsetRshStream(OutputStream rshStream) toString()voidwrite(byte[] bytes) voidwrite(byte[] bytes, int offset, int len) voidwrite(int b) Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
TRACE_PREFIX
- See Also:
-
-
Constructor Details
-
RpcRshOutputStream
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 Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
toString
-
getRshStream
-
setRshStream
-