Class BufferedChecksumStreamOutput

org.elasticsearch.common.io.stream.StreamOutput
org.elasticsearch.index.translog.BufferedChecksumStreamOutput
All Implemented Interfaces:
, ,

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

    • BufferedChecksumStreamOutput

      public BufferedChecksumStreamOutput(StreamOutput out)
  • Method Details

    • getChecksum

      public long getChecksum()
    • writeByte

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

      public void writeBytes(byte[] b, int offset, int length) throws
      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:
    • flush

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

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

      public void reset() throws
      Specified by:
      reset in class StreamOutput
      Throws:
    • resetDigest

      public void resetDigest()