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

Class NoCloseWriter

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


    public class NoCloseWriter
    extends java.io.BufferedWriter
    The NoCloseWriter ignores the close so that one can keep writing to the underlying stream.
    • Constructor Summary

      Constructors 
      Constructor and Description
      NoCloseWriter(java.io.Writer writer)
      Creates a No Close Writer
      NoCloseWriter(java.io.Writer writer, int size)
      Creates a No Close Writer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close() 
      void realClose()
      Closes the writer (close is ignored).
      • Methods inherited from class java.io.BufferedWriter

        flush, newLine, write, write, write
      • Methods inherited from class java.io.Writer

        append, append, append, write, write
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoCloseWriter

        public NoCloseWriter(java.io.Writer writer)
        Creates a No Close Writer
        Parameters:
        writer - writer to write to
      • NoCloseWriter

        public NoCloseWriter(java.io.Writer writer,
                             int size)
        Creates a No Close Writer
        Parameters:
        writer - writer 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.BufferedWriter
        Throws:
        java.io.IOException
      • realClose

        public void realClose()
                       throws java.io.IOException
        Closes the writer (close 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.