public class SocketOutputStream extends FilterOutputStream
|Constructor and Description|
Creates a SocketOutputStream instance wrapping an output stream and storing a reference to a socket that should be closed on closing the stream.
|Modifier and Type||Method and Description|
Closes the stream and immediately afterward closes the referenced socket.
Writes a number of bytes from a byte array to the stream starting from a given offset.
public SocketOutputStream(Socket socket, OutputStream stream)
socket- The socket to close on closing the stream.
stream- The input stream to wrap.
public void write(byte buffer, int offset, int length) throws IOException
public void close() throws IOException
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.