Class FileSegment
- java.lang.Object
-
- org.exbin.auxiliary.paged_data.delta.DataSegment
-
- org.exbin.auxiliary.paged_data.delta.FileSegment
-
- All Implemented Interfaces:
DoublyLinkedItem<DataSegment>
@ParametersAreNonnullByDefault public class FileSegment extends DataSegment
Data segment pointing to file.
-
-
Constructor Summary
Constructors Constructor Description FileSegment(FileDataSource source, long startPosition, long length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSegmentcopy()Returns detached copy of this segment.bytegetByte(long position)longgetLength()Returns length of this segment in bytes.FileDataSourcegetSource()longgetStartPosition()Returns start position.voidsetLength(long length)voidsetStartPosition(long startPosition)-
Methods inherited from class org.exbin.auxiliary.paged_data.delta.DataSegment
getNext, getPrev, setNext, setPrev
-
-
-
-
Constructor Detail
-
FileSegment
public FileSegment(FileDataSource source, long startPosition, long length)
-
-
Method Detail
-
getSource
@Nonnull public FileDataSource getSource()
-
getStartPosition
public long getStartPosition()
Description copied from class:DataSegmentReturns start position.- Specified by:
getStartPositionin classDataSegment- Returns:
- start position
-
setStartPosition
public void setStartPosition(long startPosition)
-
getLength
public long getLength()
Description copied from class:DataSegmentReturns length of this segment in bytes.- Specified by:
getLengthin classDataSegment- Returns:
- length of this segment
-
setLength
public void setLength(long length)
-
getByte
public byte getByte(long position)
-
copy
@Nonnull public DataSegment copy()
Description copied from class:DataSegmentReturns detached copy of this segment.- Specified by:
copyin classDataSegment- Returns:
- copy of this segment
-
-