java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.aoapps.hodgepodge.io.DontCloseOutputStream
- All Implemented Interfaces:
NoClose
,Closeable
,Flushable
,AutoCloseable
@Deprecated(forRemoval=true)
public class DontCloseOutputStream
extends FilterOutputStream
implements NoClose
Deprecated, for removal: This API element is subject to removal in a future version.
Wraps an OutputStream to protect it from close calls. This is useful for at least
GZIPOutputStream where the native resources of the GZIPOutputStream 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.FilterOutputStream
out
-
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 OutputStream.void
write
(byte[] b, int off, int len) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.io.FilterOutputStream
flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
DontCloseOutputStream
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
write
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
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 OutputStream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceNoClose
- Overrides:
close
in classFilterOutputStream
-
NoCloseOutputStream
instead