Class TransactionStorage.FrameOutputStream

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

    public static final class TransactionStorage.FrameOutputStream
    extends java.io.ByteArrayOutputStream
    • Field Summary

      • Fields inherited from class java.io.ByteArrayOutputStream

        buf, count
    • Constructor Summary

      Constructors 
      Constructor Description
      FrameOutputStream​(byte frameId)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void flush()  
      byte getFrameId()  
      void write​(byte[] b, int offset, int length)  
      void write​(int b)  
      void writeDocument​(IngestDocument doc)  
      protected void writeInt​(int value)  
      void writeMessageId​(MessageId mid)
      NOTE: this write bypasses the checksummed buffer.
      void writeObject​(java.lang.Object o)  
      protected void writeShort​(int value)  
      void writeString​(java.lang.String value)
      NOTE: this write bypasses the checksummed buffer.
      • Methods inherited from class java.io.ByteArrayOutputStream

        close, reset, size, toByteArray, toString, toString, toString, toString, 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
    • Constructor Detail

      • FrameOutputStream

        public FrameOutputStream​(byte frameId)
    • Method Detail

      • getFrameId

        public byte getFrameId()
      • writeShort

        protected void writeShort​(int value)
      • writeInt

        protected void writeInt​(int value)
      • writeMessageId

        public void writeMessageId​(MessageId mid)
                            throws java.io.IOException
        NOTE: this write bypasses the checksummed buffer.
        Throws:
        java.io.IOException
      • writeString

        public final void writeString​(java.lang.String value)
                               throws java.io.IOException
        NOTE: this write bypasses the checksummed buffer.
        Throws:
        java.io.IOException
      • writeDocument

        public void writeDocument​(IngestDocument doc)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeObject

        public void writeObject​(java.lang.Object o)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int offset,
                          int length)
        Overrides:
        write in class java.io.ByteArrayOutputStream
      • write

        public void write​(int b)
        Overrides:
        write in class java.io.ByteArrayOutputStream
      • flush

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