Package hec.io
Enum Class FileOffsetError
- All Implemented Interfaces:
Serializable
,Comparable<FileOffsetError>
,Constable
Represents an error condition found when locating a file offset.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHit EoF before finding the specified dataInvalid arguments were provided, thus data was unable to be located.An IOException occurred while trying to locate the specified dataThe offset for the specified data was unable to be calculated because the specified data was not able to be located.An unknown error occured when attempting to locate the specified data -
Method Summary
Modifier and TypeMethodDescriptionlong
static FileOffsetError
identify
(long errorCode) Returns an error code for the specified long, or null if the long is not negativestatic FileOffsetError
Returns the enum constant of this class with the specified name.static FileOffsetError[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Hit EoF before finding the specified data -
IO_EXCEPTION
An IOException occurred while trying to locate the specified data -
INVALID_ARGUMENTS
Invalid arguments were provided, thus data was unable to be located. -
UNKNOWN
An unknown error occured when attempting to locate the specified data
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getErrorCode
public long getErrorCode() -
identify
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.
-