Class LoggerImpl.RedirectorStream

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

    private class LoggerImpl.RedirectorStream
    extends java.io.ByteArrayOutputStream
    Redirects any incoming text to the logger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected LogIDs logID  
      protected int logType  
      protected java.io.PrintStream ps  
      • Fields inherited from class java.io.ByteArrayOutputStream

        buf, count
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected RedirectorStream​(java.io.PrintStream _ps, LogIDs _logID, int _logType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void flush()  
      void reset()  
      • Methods inherited from class java.io.ByteArrayOutputStream

        size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
      • Methods inherited from class java.io.OutputStream

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

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

      • ps

        protected final java.io.PrintStream ps
      • logID

        protected final LogIDs logID
      • logType

        protected final int logType
    • Constructor Detail

      • RedirectorStream

        protected RedirectorStream​(java.io.PrintStream _ps,
                                   LogIDs _logID,
                                   int _logType)
    • Method Detail

      • reset

        public void reset()
        Overrides:
        reset in class java.io.ByteArrayOutputStream
      • close

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

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        Throws:
        java.io.IOException