public class CloseResourceInputStream extends FilterInputStream
Modifier and Type | Field and Description |
---|---|
private Closeable |
resource |
in
Constructor and Description |
---|
CloseResourceInputStream(InputStream parent,
Closeable resource)
Create a new stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Make sure the client connection manager is closed when the
file has been completely downloaded.
|
available, mark, markSupported, read, read, read, reset, skip
private final Closeable resource
public CloseResourceInputStream(InputStream parent, Closeable resource)
parent
- The parent input streamresource
- The resource to close when the close()
method is called.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException