org.apache.commons.net.io
public class SocketInputStream extends FilterInputStream
SocketOutputStream
in
Constructor and Description |
---|
SocketInputStream(Socket socket,
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 and Description |
---|---|
void |
close()
Closes the stream and immediately afterward closes the referenced
socket.
|
available, mark, markSupported, read, read, read, reset, skip
public SocketInputStream(Socket socket, InputStream stream)
socket
- The socket to close on closing the stream.stream
- The input stream to wrap.public void close() throws IOException
close
in interface Closeable
close
in class FilterInputStream
IOException
- If there is an error in closing the stream
or socket.Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.