Class BufferedChecksumStreamInput

All Implemented Interfaces:
,

public final class BufferedChecksumStreamInput extends FilterStreamInput
Similar to Lucene's BufferedChecksumIndexInput, however this wraps a StreamInput so anything read will update the checksum
  • Constructor Details

  • Method Details

    • getChecksum

      public long getChecksum()
    • readByte

      public byte readByte() throws
      Description copied from class: StreamInput
      Reads and returns a single byte.
      Overrides:
      readByte in class FilterStreamInput
      Throws:
    • readBytes

      public void readBytes(byte[] b, int offset, int len) throws
      Description copied from class: StreamInput
      Reads a specified number of bytes into an array at the specified offset.
      Overrides:
      readBytes in class FilterStreamInput
      Parameters:
      b - the array to read bytes into
      offset - the offset in the array to start storing bytes
      len - the number of bytes to read
      Throws:
    • readShort

      public short readShort() throws
      Overrides:
      readShort in class FilterStreamInput
      Throws:
    • readInt

      public int readInt() throws
      Description copied from class: StreamInput
      Reads four bytes and returns an int.
      Overrides:
      readInt in class FilterStreamInput
      Throws:
    • readLong

      public long readLong() throws
      Description copied from class: StreamInput
      Reads eight bytes and returns a long.
      Overrides:
      readLong in class FilterStreamInput
      Throws:
    • readVInt

      public int readVInt() throws
      Description copied from class: StreamInput
      Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers will always use all 5 bytes and are therefore better serialized using StreamInput.readInt()
      Overrides:
      readVInt in class FilterStreamInput
      Throws:
    • readVLong

      public long readVLong() throws
      Description copied from class: StreamInput
      Reads a long stored in variable-length format. Reads between one and ten bytes. Smaller values take fewer bytes. Negative numbers are encoded in ten bytes so prefer StreamInput.readLong() or StreamInput.readZLong() for negative numbers.
      Overrides:
      readVLong in class FilterStreamInput
      Throws:
    • reset

      public void reset() throws
      Overrides:
      reset in class FilterStreamInput
      Throws:
    • read

      public int read() throws
      Overrides:
      read in class FilterStreamInput
      Throws:
    • markSupported

      public boolean markSupported()
      Overrides:
       in class 
    • skip

      public long skip(long numBytes) throws
      Overrides:
       in class 
      Throws:
    • mark

      public void mark(int readlimit)
      Overrides:
       in class 
    • resetDigest

      public void resetDigest()
    • getSource

      public  getSource()