com.perforce.p4java.impl.mapbased.rpc.stream
Class RpcSocketOutputStream
java.lang.Object
java.io.OutputStream
com.perforce.p4java.impl.mapbased.rpc.stream.RpcSocketOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class RpcSocketOutputStream
- extends OutputStream
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRACE_PREFIX
public static final String TRACE_PREFIX
- See Also:
- Constant Field Values
RpcSocketOutputStream
public RpcSocketOutputStream(Socket socket,
ServerStats stats)
- 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 socket
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
getSocket
protected Socket getSocket()
setSocket
protected void setSocket(Socket socket)
getSocketStream
protected OutputStream getSocketStream()
setSocketStream
protected void setSocketStream(OutputStream socketStream)
Copyright © 2015 Perforce Software. All Rights Reserved.