public class SocketInputStream
extends java.io.FilterInputStream
SocketOutputStream
Constructor | Description |
---|---|
SocketInputStream(java.net.Socket socket,
java.io.InputStream stream) |
Creates a SocketInputStream instance wrapping an input stream and
storing a reference to a socket that should be closed on closing
the stream.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes the stream and immediately afterward closes the referenced
socket.
|
public SocketInputStream(java.net.Socket socket, java.io.InputStream stream)
socket
- The socket to close on closing the stream.stream
- The input stream to wrap.