Package hec.io

Enum Class FileOffsetError

All Implemented Interfaces:
Serializable, Comparable<FileOffsetError>, Constable

public enum FileOffsetError extends Enum<FileOffsetError>
Represents an error condition found when locating a file offset.
  • Enum Constant Details

    • SPECIFIED_DATA_NOT_FOUND

      public static final FileOffsetError SPECIFIED_DATA_NOT_FOUND
      The offset for the specified data was unable to be calculated because the specified data was not able to be located.
    • EOF

      public static final FileOffsetError EOF
      Hit EoF before finding the specified data
    • IO_EXCEPTION

      public static final FileOffsetError IO_EXCEPTION
      An IOException occurred while trying to locate the specified data
    • INVALID_ARGUMENTS

      public static final FileOffsetError INVALID_ARGUMENTS
      Invalid arguments were provided, thus data was unable to be located.
    • UNKNOWN

      public static final FileOffsetError UNKNOWN
      An unknown error occured when attempting to locate the specified data
  • Method Details

    • values

      public static FileOffsetError[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FileOffsetError valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getErrorCode

      public long getErrorCode()
    • identify

      public static FileOffsetError identify(long errorCode)
      Returns an error code for the specified long, or null if the long is not negative
      Parameters:
      errorCode - The error code to find an error for
      Returns:
      An Error for any negative value or null for any other value.