java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.aoapps.hodgepodge.io.DontCloseInputStream
- All Implemented Interfaces:
NoClose
,Closeable
,AutoCloseable
@Deprecated(forRemoval=true)
public class DontCloseInputStream
extends FilterInputStream
implements NoClose
Deprecated, for removal: This API element is subject to removal in a future version.
Wraps an InputStream to protect it from close calls. This is useful for at least
GZIPInputStream where the native resources of the GZIPInputStream need to be released
using the close call while the underlying stream is left intact.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated, for removal: This API element is subject to removal in a future version.Does nothing on close to protect the wrapped InputStream.Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Constructor Details
-
DontCloseInputStream
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
close
public void close()Deprecated, for removal: This API element is subject to removal in a future version.Does nothing on close to protect the wrapped InputStream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceNoClose
- Overrides:
close
in classFilterInputStream
-
NoCloseInputStream
instead