Package nl.siegmann.epublib.util
Class NoCloseWriter
- java.lang.Object
-
- java.io.Writer
-
- nl.siegmann.epublib.util.NoCloseWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class NoCloseWriter extends java.io.WriterWriter 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 Writers in this NoCloseWriter.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Writerwriter
-
Constructor Summary
Constructors Constructor Description NoCloseWriter(java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(char[] cbuf, int off, int len)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException
-
write
public void write(char[] cbuf, int off, int len) throws java.io.IOException- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
-