Class QuietWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable
    Direct Known Subclasses:
    CountingQuietWriter, SyslogQuietWriter

    public class QuietWriter
    extends java.io.FilterWriter
    QuietWriter does not throw exceptions when things go wrong. Instead, it delegates error handling to its ErrorHandler.
    Since:
    0.7.3
    Author:
    Ceki Gülcü
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected ErrorHandler errorHandler  
      • Fields inherited from class java.io.FilterWriter

        out
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      QuietWriter​(java.io.Writer writer, ErrorHandler errorHandler)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void flush()  
      void setErrorHandler​(ErrorHandler eh)  
      void write​(java.lang.String string)  
      • Methods inherited from class java.io.FilterWriter

        close, write, write, write
      • Methods inherited from class java.io.Writer

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

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

      • QuietWriter

        public QuietWriter​(java.io.Writer writer,
                           ErrorHandler errorHandler)
    • Method Detail

      • write

        public void write​(java.lang.String string)
        Overrides:
        write in class java.io.Writer
      • flush

        public void flush()
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.FilterWriter
      • setErrorHandler

        public void setErrorHandler​(ErrorHandler eh)