org.apache.cassandra.io.util

## Class BufferedSegmentedFile

- java.lang.Object
- - org.apache.cassandra.utils.concurrent.SharedCloseableImpl
  - - org.apache.cassandra.io.util.SegmentedFile
    - - org.apache.cassandra.io.util.BufferedSegmentedFile

All Implemented Interfaces:
  java.lang.AutoCloseable, SharedCloseable

    public class BufferedSegmentedFile
    extends SegmentedFile

### Nested Class Summary

Nested Classes
`static class` `BufferedSegmentedFile.Builder`

### Field Summary

### Fields inherited from class org.apache.cassandra.io.util.SegmentedFile

`channel, length, onDiskLength`

### Constructor Summary

Constructors
Constructor and Description
`BufferedSegmentedFile(ChannelProxy channel, long length)`

### Method Summary

All Methods Instance Methods Concrete Methods
`FileDataInput` `getSegment(long position)`
`BufferedSegmentedFile` `sharedCopy()`

### Methods inherited from class org.apache.cassandra.io.util.SegmentedFile

`copyReadableBounds, createReader, createThrottledReader, dropPageCache, getBuilder, getCompressedBuilder, iterator, path, toString`

### Methods inherited from class org.apache.cassandra.utils.concurrent.SharedCloseableImpl

`close, close, isCleanedUp`

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

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

### Constructor Detail

#### BufferedSegmentedFile

    public BufferedSegmentedFile(ChannelProxy channel,
                                 long length)

### Method Detail

#### getSegment

    public FileDataInput getSegment(long position)

Overrides:
  `getSegment` in class `SegmentedFile`

#### sharedCopy

    public BufferedSegmentedFile sharedCopy()

Specified by:
  `sharedCopy` in interface `SharedCloseable`
Specified by:
  `sharedCopy` in class `SegmentedFile`
Returns:
  a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.