Class LogHeader


  • public class LogHeader
    extends java.lang.Object
    The header of the log, including the list of items. The header must always be written using UTF-8, StandardCharsets.UTF_8. '\n', ascii 12, is used as new line separator.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_LINE_LENGTH
      The maximum length of a string in the header.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogHeader​(Log logixNGLog)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Encodings getEncoding()
      Get the encoding of this log.
      java.lang.String getName()
      Get the name of this log.
      void readHeader​(java.io.InputStream input)
      Read the header of this log from an InputStream.
      void setEncoding​(Encodings encoding)
      Set the encoding of this log.
      void setName​(java.lang.String name)
      Set the name of this log.
      void writeHeader​(java.io.OutputStream output)
      Write the header of this log to an OutputStream.
      • Methods inherited from class java.lang.Object

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

      • setEncoding

        public void setEncoding​(Encodings encoding)
        Set the encoding of this log.
        Parameters:
        encoding - the encoding
      • setName

        public void setName​(java.lang.String name)
        Set the name of this log.
        Parameters:
        name - the name
      • getName

        public java.lang.String getName()
        Get the name of this log.
        Returns:
        the name
      • writeHeader

        public void writeHeader​(java.io.OutputStream output)
                         throws java.io.IOException
        Write the header of this log to an OutputStream.
        Parameters:
        output - the stream to write to
        Throws:
        java.io.IOException - if an I/O error occurs