FileSegmentInputStream (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.io.util

## Class FileSegmentInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.cassandra.io.util.RebufferingInputStream
    - - org.apache.cassandra.io.util.DataInputBuffer
      - - org.apache.cassandra.io.util.FileSegmentInputStream

- All Implemented Interfaces:
    java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, DataInputPlus, FileDataInput, RewindableDataInput
  Direct Known Subclasses:
    EncryptedFileSegmentInputStream

      public class FileSegmentInputStream
      extends DataInputBuffer
      implements FileDataInput

  This is the same as DataInputBuffer, i.e. a stream for a fixed byte buffer, except that we also implement FileDataInput by using an offset and a file path.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.io.util.DataInputPlus

      `DataInputPlus.DataInputStreamPlus`

  - ### Field Summary

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

      `buffer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileSegmentInputStream(java.nio.ByteBuffer buffer, java.lang.String filePath, long offset)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `bytesPastMark(DataPosition mark)`
    `long` | `bytesRemaining()`
    `long` | `getFilePointer()`
    `java.lang.String` | `getPath()`
    `boolean` | `isEOF()`
    `DataPosition` | `mark()`
    `boolean` | `markSupported()`
    `void` | `reset(DataPosition mark)`
    `void` | `seek(long pos)`

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

      `available, reBuffer`

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

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

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

      `close, mark, read, reset, skip`

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

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

    - ### Methods inherited from interface org.apache.cassandra.io.util.DataInputPlus

      `readUnsignedVInt, readVInt, skipBytes, skipBytesFully`

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

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

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

      `close`

- - ### Constructor Detail

    - #### FileSegmentInputStream

          public FileSegmentInputStream(java.nio.ByteBuffer buffer,
                                        java.lang.String filePath,
                                        long offset)

  - ### Method Detail

    - #### getPath

          public java.lang.String getPath()

      Specified by:
        `getPath` in interface `FileDataInput`

    - #### isEOF

          public boolean isEOF()

      Specified by:
        `isEOF` in interface `FileDataInput`

    - #### bytesRemaining

          public long bytesRemaining()

      Specified by:
        `bytesRemaining` in interface `FileDataInput`

    - #### seek

          public void seek(long pos)

      Specified by:
        `seek` in interface `FileDataInput`

    - #### markSupported

          public boolean markSupported()

      Overrides:
        `markSupported` in class `java.io.InputStream`

    - #### mark

          public DataPosition mark()

      Specified by:
        `mark` in interface `RewindableDataInput`

    - #### reset

          public void reset(DataPosition mark)

      Specified by:
        `reset` in interface `RewindableDataInput`

    - #### bytesPastMark

          public long bytesPastMark(DataPosition mark)

      Specified by:
        `bytesPastMark` in interface `RewindableDataInput`

    - #### getFilePointer

          public long getFilePointer()

      Specified by:
        `getFilePointer` in interface `FileDataInput`

Copyright © 2018 The Apache Software Foundation