Package hec.io

Class FileOffsets

java.lang.Object
hec.io.FileOffsets
All Implemented Interfaces:
Serializable

public class FileOffsets extends Object implements Serializable
Represents a start and end offset, or a possible error condition that was reached when attempting to identify the offsets.
See Also:
  • Constructor Details

    • FileOffsets

      public FileOffsets(long startOffset, long endOffset)
      Create a FileOffsets with two file offsets
      Parameters:
      startOffset - A start offset
      endOffset - An end offset
    • FileOffsets

      public FileOffsets(long startOffset, FileOffsetError endError)
      Create a FileOffsets with a start offset and an error for the end offset
      Parameters:
      startOffset - The start file offset
      endError - The end error
    • FileOffsets

      public FileOffsets(FileOffsetError startError, int endOffset)
      Create a FileOffsets with an error for the start and an offset for the end
      Parameters:
      startError - The error for the start offset
      endOffset - The offset for the end
    • FileOffsets

      public FileOffsets(FileOffsetError startError, FileOffsetError endError)
      Create a FileOffsets with an error for the start and end offsets
      Parameters:
      startError - the error for the end offset
      endError - 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

      public FileOffsetError getStartError()
      Returns:
      An error if the start offset is negative, null otherwise
    • getEndError

      public FileOffsetError getEndError()
      Returns:
      An error if the end offset is negative, null otherwise