public class SocketInputStream extends FilterInputStream
SocketOutputStreamin| 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, skippublic 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 Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOException - If there is an error in closing the stream
or socket.Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.