public class FileSegment extends DataSegment
Constructor and Description |
---|
FileSegment(FileDataSource source,
long startPosition,
long length) |
Modifier and Type | Method and Description |
---|---|
DataSegment |
copy()
Returns detached copy of this segment.
|
byte |
getByte(long position) |
long |
getLength()
Returns length of this segment in bytes.
|
FileDataSource |
getSource() |
long |
getStartPosition()
Returns start position.
|
void |
setLength(long length) |
void |
setStartPosition(long startPosition) |
getNext, getPrev, setNext, setPrev
public FileSegment(FileDataSource source, long startPosition, long length)
public FileDataSource getSource()
public long getStartPosition()
DataSegment
getStartPosition
in class DataSegment
public void setStartPosition(long startPosition)
public long getLength()
DataSegment
getLength
in class DataSegment
public void setLength(long length)
public byte getByte(long position)
public DataSegment copy()
DataSegment
copy
in class DataSegment