Class BufferedChecksumStreamOutput

java.lang.Object
java.io.OutputStream
org.opensearch.core.common.io.stream.StreamOutput
org.opensearch.index.translog.BufferedChecksumStreamOutput
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@PublicApi(since="1.0.0") public final class BufferedChecksumStreamOutput extends org.opensearch.core.common.io.stream.StreamOutput
Similar to Lucene's BufferedChecksumIndexOutput, however this wraps a StreamOutput so anything written will update the checksum
Opensearch.api:
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferedChecksumStreamOutput(org.opensearch.core.common.io.stream.StreamOutput out)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    long
     
    void
     
    void
     
    void
    writeByte(byte b)
     
    void
    writeBytes(byte[] b, int offset, int length)
     

    Methods inherited from class org.opensearch.core.common.io.stream.StreamOutput

    checkWriteable, failOnTooManyNestedExceptions, getFeatures, getVersion, getWriter, hasFeature, position, seek, setFeatures, setVersion, write, write, writeArray, writeArray, writeBigInteger, writeBoolean, writeBuild, writeByteArray, writeBytes, writeBytes, writeBytesRef, writeBytesReference, writeCollection, writeCollection, writeDouble, writeDoubleArray, writeEnum, writeEnumSet, writeException, writeFloat, writeFloatArray, writeGenericValue, writeInstant, writeInt, writeIntArray, writeList, writeLong, writeLongArray, writeMap, writeMap, writeMapOfLists, writeMapWithConsistentOrder, writeNamedWriteable, writeNamedWriteableList, writeOptionalArray, writeOptionalArray, writeOptionalBoolean, writeOptionalBytesReference, writeOptionalDouble, writeOptionalFloat, writeOptionalInstant, writeOptionalInt, writeOptionalLong, writeOptionalNamedWriteable, writeOptionalSecureString, writeOptionalString, writeOptionalStringArray, writeOptionalStringCollection, writeOptionalText, writeOptionalTimeValue, writeOptionalVInt, writeOptionalVLong, writeOptionalWriteable, writeOptionalZoneId, writeSecureString, writeSemverRange, writeShort, writeString, writeStringArray, writeStringArrayNullable, writeStringCollection, writeText, writeTimeValue, writeVersion, writeVInt, writeVIntArray, writeVLong, writeVLongArray, writeVLongNoCheck, writeZLong, writeZoneId

    Methods inherited from class java.io.OutputStream

    nullOutputStream, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BufferedChecksumStreamOutput

      public BufferedChecksumStreamOutput(org.opensearch.core.common.io.stream.StreamOutput out)
  • Method Details

    • getChecksum

      public long getChecksum()
    • writeByte

      public void writeByte(byte b) throws IOException
      Specified by:
      writeByte in class org.opensearch.core.common.io.stream.StreamOutput
      Throws:
      IOException
    • writeBytes

      public void writeBytes(byte[] b, int offset, int length) throws IOException
      Specified by:
      writeBytes in class org.opensearch.core.common.io.stream.StreamOutput
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in class org.opensearch.core.common.io.stream.StreamOutput
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.opensearch.core.common.io.stream.StreamOutput
      Throws:
      IOException
    • reset

      public void reset() throws IOException
      Specified by:
      reset in class org.opensearch.core.common.io.stream.StreamOutput
      Throws:
      IOException
    • resetDigest

      public void resetDigest()