org.apache.cassandra.io.util

## Class ChecksummedRandomAccessReader

- java.lang.Object
- - java.io.InputStream
  - - org.apache.cassandra.io.util.AbstractDataInput
    - - org.apache.cassandra.io.util.RandomAccessReader
      - - org.apache.cassandra.io.util.ChecksummedRandomAccessReader

- All Implemented Interfaces:
    java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, FileDataInput

      public class ChecksummedRandomAccessReader
      extends RandomAccessReader

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ChecksummedRandomAccessReader.CorruptFileException`

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.io.util.RandomAccessReader

      `RandomAccessReader.BufferedRandomAccessFileMark`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.io.util.RandomAccessReader

      `buffer, BUFFER_SIZE, bufferOffset, channel, DEFAULT_BUFFER_SIZE, markedPointer, owner`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ChecksummedRandomAccessReader(java.io.File file, ChannelProxy channel, DataIntegrityMetadata.ChecksumValidator validator)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `static ChecksummedRandomAccessReader` | `open(java.io.File file, java.io.File crcFile)`
    `protected void` | `reBuffer()` Read data from file starting from current currentOffset to populate buffer.
    `void` | `seek(long newPosition)`

    - ### Methods inherited from class org.apache.cassandra.io.util.RandomAccessReader

      `allocateBuffer, bytesPastMark, bytesPastMark, bytesRemaining, current, deallocate, getChannel, getFilePointer, getPath, getPosition, getPositionLimit, getTotalBufferSize, isEOF, length, mark, open, open, open, open, read, read, read, readBytes, reset, reset, toString`

    - ### Methods inherited from class org.apache.cassandra.io.util.AbstractDataInput

      `readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes`

    - ### Methods inherited from class java.io.InputStream

      `available, mark, markSupported, skip`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.io.DataInput

      `readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes`

- - ### Constructor Detail

    - #### ChecksummedRandomAccessReader

          protected ChecksummedRandomAccessReader(java.io.File file,
                                                  ChannelProxy channel,
                                                  DataIntegrityMetadata.ChecksumValidator validator)

  - ### Method Detail

    - #### open

          public static ChecksummedRandomAccessReader open(java.io.File file,
                                                           java.io.File crcFile)
                                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### reBuffer

          protected void reBuffer()

      Description copied from class: `RandomAccessReader`
      Read data from file starting from current currentOffset to populate buffer.
      Overrides:
        `reBuffer` in class `RandomAccessReader`

    - #### seek

          public void seek(long newPosition)

      Specified by:
        `seek` in interface `FileDataInput`
      Overrides:
        `seek` in class `RandomAccessReader`

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `RandomAccessReader`

Copyright © 2018 The Apache Software Foundation