public class CloseResourceInputStream
extends java.io.FilterInputStream
Modifier and Type | Field and Description |
---|---|
private java.io.Closeable |
resource |
Constructor and Description |
---|
CloseResourceInputStream(java.io.InputStream parent,
java.io.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.
|
public CloseResourceInputStream(java.io.InputStream parent, java.io.Closeable resource)
parent
- The parent input streamresource
- The resource to close when the close()
method is called.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException