Class BufferedChecksumStreamOutput

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

    public final class BufferedChecksumStreamOutput
    extends StreamOutput
    Similar to Lucene's BufferedChecksumIndexOutput, however this wraps a StreamOutput so anything written will update the checksum
    • Constructor Detail

      • BufferedChecksumStreamOutput

        public BufferedChecksumStreamOutput​(StreamOutput out)
    • Method Detail

      • getChecksum

        public long getChecksum()
      • writeByte

        public void writeByte​(byte b)
                       throws java.io.IOException
        Description copied from class: StreamOutput
        Writes a single byte.
        Specified by:
        writeByte in class StreamOutput
        Throws:
        java.io.IOException
      • writeBytes

        public void writeBytes​(byte[] b,
                               int offset,
                               int length)
                        throws java.io.IOException
        Description copied from class: StreamOutput
        Writes an array of bytes.
        Specified by:
        writeBytes in class StreamOutput
        Parameters:
        b - the bytes to write
        offset - the offset in the byte array
        length - the number of bytes to write
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from class: StreamOutput
        Forces any buffered output to be written.
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class StreamOutput
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: StreamOutput
        Closes this stream to further operations.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class StreamOutput
        Throws:
        java.io.IOException
      • reset

        public void reset()
                   throws java.io.IOException
        Specified by:
        reset in class StreamOutput
        Throws:
        java.io.IOException
      • resetDigest

        public void resetDigest()