Class DisabledOutputStream

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

    public final class DisabledOutputStream
    extends java.io.OutputStream
    An OutputStream which always throws IllegalStateExeption during write.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static DisabledOutputStream INSTANCE
      The canonical instance which always throws IllegalStateException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(int b)  
      • Methods inherited from class java.io.OutputStream

        close, flush, nullOutputStream, write, write
      • Methods inherited from class java.lang.Object

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

      • INSTANCE

        public static final DisabledOutputStream INSTANCE
        The canonical instance which always throws IllegalStateException.
    • Method Detail

      • write

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException