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 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)
-
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:DataSegment
Returns start position.- Specified by:
getStartPosition
in classDataSegment
- Returns:
- start position
-
setStartPosition
public void setStartPosition(long startPosition)
-
getLength
public long getLength()
Description copied from class:DataSegment
Returns length of this segment in bytes.- Specified by:
getLength
in 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:DataSegment
Returns detached copy of this segment.- Specified by:
copy
in classDataSegment
- Returns:
- copy of this segment
-
-