Documentation of 'org.freehep.util.io.NoCloseOutputStream' Java class
NoCloseOutputStream
org.freehep.util.io

Class NoCloseOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable


    public class NoCloseOutputStream
    extends java.io.BufferedOutputStream
    The 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
      void close() 
      void realClose()
      Closes the stream (the close method is ignored).
      • Methods inherited from class java.io.BufferedOutputStream

        flush, write, write
      • Methods inherited from class java.io.FilterOutputStream

        write
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 to
        size - buffer size
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • realClose

        public void realClose()
                       throws java.io.IOException
        Closes the stream (the close method is ignored).
        Throws:
        java.io.IOException - if the close fails

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.