Class RpcSocketOutputStream
java.lang.Object
java.io.OutputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcSocketOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Implements the lowest level of the P4Java RPC 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
ConstructorsConstructorDescriptionRpcSocketOutputStream(Socket socket, ServerStats stats) Construct a suitable stream for the passed-in socket. -
Method Summary
Modifier and TypeMethodDescriptionprotected Socketprotected OutputStreamprotected voidprotected voidsetSocketStream(OutputStream socketStream) voidwrite(byte[] bytes) voidwrite(byte[] bytes, int offset, int len) voidwrite(int b) Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
Field Details
-
TRACE_PREFIX
- See Also:
-
-
Constructor Details
-
RpcSocketOutputStream
Construct a suitable stream for the passed-in socket. No assumptions are made about the passed-in socket except that a) it's not null, and b) it's been initialized and set up for reading (or at least the successful retrieval of a suitable input stream) by the caller.- Parameters:
socket- non-null socketstats- stats
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
getSocket
-
setSocket
-
getSocketStream
-
setSocketStream
-