Package nl.siegmann.epublib.util
Class NoCloseOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- nl.siegmann.epublib.util.NoCloseOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class NoCloseOutputStream extends java.io.OutputStreamOutputStream with the close() disabled. We write multiple documents to a ZipOutputStream. Some of the formatters call a close() after writing their data. We don't want them to do that, so we wrap regular OutputStreams in this NoCloseOutputStream.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.OutputStreamoutputStream
-
Constructor Summary
Constructors Constructor Description NoCloseOutputStream(java.io.OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()A close() that does not call it's parent's close()voidwrite(int b)
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
close
public void close()
A close() that does not call it's parent's close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream
-
-