Package org.jfree.report.util
Class NoCloseOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.jfree.report.util.NoCloseOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
A Wrapper stream that does never calls close on its parent. This implementation is
needed when creating ZipOutputStream, as the final ZipDirectory is written when close
is called on the ZipOutputSteam.
- Author:
- Thomas Morgner
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new NoCloseOutputStream with the given output stream a parent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this output stream and releases any system resources associated with the stream, but does not close the underlying output stream.Methods inherited from class java.io.FilterOutputStream
flush, write, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
NoCloseOutputStream
Create a new NoCloseOutputStream with the given output stream a parent.- Parameters:
out
- the parent stream
-
-
Method Details
-
close
Closes this output stream and releases any system resources associated with the stream, but does not close the underlying output stream. Theclose
method ofFilterOutputStream
calls itsflush
method.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
- if an I/O error occurs.- See Also:
-