Package hec.io
Class FileOffsets
java.lang.Object
hec.io.FileOffsets
- All Implemented Interfaces:
Serializable
Represents a start and end offset, or a possible error condition
that was reached when attempting to identify the offsets.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFileOffsets
(long startOffset, long endOffset) Create a FileOffsets with two file offsetsFileOffsets
(long startOffset, FileOffsetError endError) Create a FileOffsets with a start offset and an error for the end offsetFileOffsets
(FileOffsetError startError, int endOffset) Create a FileOffsets with an error for the start and an offset for the endFileOffsets
(FileOffsetError startError, FileOffsetError endError) Create a FileOffsets with an error for the start and end offsets -
Method Summary
Modifier and TypeMethodDescriptionlong
long
-
Constructor Details
-
FileOffsets
public FileOffsets(long startOffset, long endOffset) Create a FileOffsets with two file offsets- Parameters:
startOffset
- A start offsetendOffset
- An end offset
-
FileOffsets
Create a FileOffsets with a start offset and an error for the end offset- Parameters:
startOffset
- The start file offsetendError
- The end error
-
FileOffsets
Create a FileOffsets with an error for the start and an offset for the end- Parameters:
startError
- The error for the start offsetendOffset
- The offset for the end
-
FileOffsets
Create a FileOffsets with an error for the start and end offsets- Parameters:
startError
- the error for the end offsetendError
- The error for the start offset
-
-
Method Details
-
getStartOffset
public long getStartOffset()- Returns:
- The start offset if non-negative, an error code otherwise
-
getEndOffset
public long getEndOffset()- Returns:
- The end offset if non-negative, an error code otherwise.
-
getStartError
- Returns:
- An error if the start offset is negative, null otherwise
-
getEndError
- Returns:
- An error if the end offset is negative, null otherwise
-