org.freehep.util.io
Class NoCloseOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.BufferedOutputStream
-
- org.freehep.util.io.NoCloseOutputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
public class NoCloseOutputStream extends java.io.BufferedOutputStreamThe NoCloseOutputStream ignores the close so that one can keep writing to the underlying stream.
-
-
Constructor Summary
Constructors Constructor and Description NoCloseOutputStream(java.io.OutputStream stream)Creates a No Close output stream.NoCloseOutputStream(java.io.OutputStream stream, int size)Creates a No Close output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()voidrealClose()Closes the stream (the close method is ignored).
-
-
-
Constructor Detail
-
NoCloseOutputStream
public NoCloseOutputStream(java.io.OutputStream stream)
Creates a No Close output stream.- Parameters:
stream- stream to write to
-
NoCloseOutputStream
public NoCloseOutputStream(java.io.OutputStream stream, int size)Creates a No Close output stream.- Parameters:
stream- stream to write tosize- buffer size
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
realClose
public void realClose() throws java.io.IOExceptionCloses the stream (the close method is ignored).- Throws:
java.io.IOException- if the close fails
-
-
DMelt 3.0 © DataMelt by jWork.ORG