Package io.github.zazalng.contracts
Enum DBFVersion
- All Implemented Interfaces:
Serializable,Comparable<DBFVersion>,java.lang.constant.Constable
Defines the possible versions or dialects of the DBF file format,
based on the file type byte (the first byte) in the DBF header.
- Since:
- 1.0.0
- Author:
- Zazalng
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionVersion code 0x03: FoxBASE+/dBASE III Plus, without a separate memo file.Version code 0x8B: dBASE IV with a separate memo file.Version code 0x04: dBASE IV, without a separate memo file.Version code 0xCB: dBASE IV SQL table files, with a separate memo file.Version code 0x43: dBASE IV SQL table files, without a separate memo file.Version code 0x02: FoxBASE.Version code 0x83: FoxBASE+/dBASE III Plus, with a separate memo file.Version code 0xFB: FoxBASE (simple).Version code 0xF5: FoxPro 2.x (or earlier) with a memo file.Version code 0xE5: HiPer-Six format with SMT memo file.Placeholder for an unsupported or unrecognized version code.Version code 0x30: Visual FoxPro (VFP) with or without a memo file.Version code 0x31: Visual FoxPro with autoincrement enabled.Version code 0x32: Visual FoxPro with Varchar/Varbinary fields. -
Method Summary
Modifier and TypeMethodDescriptionstatic DBFVersionfromByte(byte b) Factory method to resolve theDBFVersionfrom the raw byte code found in the file header.bytegetCode()Gets the raw byte code representing the DBF version.Gets a human-readable description of the DBF version.static DBFVersionReturns the enum constant of this type with the specified name.static DBFVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FOXBASE
Version code 0x02: FoxBASE. -
DBASE_III_PLUS_NO_MEMO
Version code 0x03: FoxBASE+/dBASE III Plus, without a separate memo file. -
FOXPRO_2X_MEMO
Version code 0xF5: FoxPro 2.x (or earlier) with a memo file. -
FOXBASE_MEMO
Version code 0x83: FoxBASE+/dBASE III Plus, with a separate memo file. -
FOXBASE_SIMPLE
Version code 0xFB: FoxBASE (simple). -
DBASE_IV_NO_MEMO
Version code 0x04: dBASE IV, without a separate memo file. -
DBASE_IV_MEMO
Version code 0x8B: dBASE IV with a separate memo file. -
DBASE_IV_SQL_NO_MEMO
Version code 0x43: dBASE IV SQL table files, without a separate memo file. -
DBASE_IV_SQL_MEMO
Version code 0xCB: dBASE IV SQL table files, with a separate memo file. -
VISUAL_FOXPRO
Version code 0x30: Visual FoxPro (VFP) with or without a memo file. -
VISUAL_FOXPRO_AUTOINCREMENT
Version code 0x31: Visual FoxPro with autoincrement enabled. -
VISUAL_FOXPRO_VARCHAR
Version code 0x32: Visual FoxPro with Varchar/Varbinary fields. -
HIPER_SIX
Version code 0xE5: HiPer-Six format with SMT memo file. -
UNKNOWN
Placeholder for an unsupported or unrecognized version code.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public byte getCode()Gets the raw byte code representing the DBF version.- Returns:
- The version code as a byte.
-
getDescription
Gets a human-readable description of the DBF version.- Returns:
- The version description.
-
fromByte
Factory method to resolve theDBFVersionfrom the raw byte code found in the file header. It compares the unsigned integer value of the byte to the known version codes.- Parameters:
b- The raw byte code from the DBF header.- Returns:
- The matching
DBFVersion, orUNKNOWNif no match is found.
-