Enum DBFVersion

java.lang.Object
java.lang.Enum<DBFVersion>
io.github.zazalng.contracts.DBFVersion
All Implemented Interfaces:
Serializable, Comparable<DBFVersion>, java.lang.constant.Constable

public enum DBFVersion extends Enum<DBFVersion>
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:
  • Enum Constant Details

    • FOXBASE

      public static final DBFVersion FOXBASE
      Version code 0x02: FoxBASE.
    • DBASE_III_PLUS_NO_MEMO

      public static final DBFVersion DBASE_III_PLUS_NO_MEMO
      Version code 0x03: FoxBASE+/dBASE III Plus, without a separate memo file.
    • FOXPRO_2X_MEMO

      public static final DBFVersion FOXPRO_2X_MEMO
      Version code 0xF5: FoxPro 2.x (or earlier) with a memo file.
    • FOXBASE_MEMO

      public static final DBFVersion FOXBASE_MEMO
      Version code 0x83: FoxBASE+/dBASE III Plus, with a separate memo file.
    • FOXBASE_SIMPLE

      public static final DBFVersion FOXBASE_SIMPLE
      Version code 0xFB: FoxBASE (simple).
    • DBASE_IV_NO_MEMO

      public static final DBFVersion DBASE_IV_NO_MEMO
      Version code 0x04: dBASE IV, without a separate memo file.
    • DBASE_IV_MEMO

      public static final DBFVersion DBASE_IV_MEMO
      Version code 0x8B: dBASE IV with a separate memo file.
    • DBASE_IV_SQL_NO_MEMO

      public static final DBFVersion DBASE_IV_SQL_NO_MEMO
      Version code 0x43: dBASE IV SQL table files, without a separate memo file.
    • DBASE_IV_SQL_MEMO

      public static final DBFVersion DBASE_IV_SQL_MEMO
      Version code 0xCB: dBASE IV SQL table files, with a separate memo file.
    • VISUAL_FOXPRO

      public static final DBFVersion VISUAL_FOXPRO
      Version code 0x30: Visual FoxPro (VFP) with or without a memo file.
    • VISUAL_FOXPRO_AUTOINCREMENT

      public static final DBFVersion VISUAL_FOXPRO_AUTOINCREMENT
      Version code 0x31: Visual FoxPro with autoincrement enabled.
    • VISUAL_FOXPRO_VARCHAR

      public static final DBFVersion VISUAL_FOXPRO_VARCHAR
      Version code 0x32: Visual FoxPro with Varchar/Varbinary fields.
    • HIPER_SIX

      public static final DBFVersion HIPER_SIX
      Version code 0xE5: HiPer-Six format with SMT memo file.
    • UNKNOWN

      public static final DBFVersion UNKNOWN
      Placeholder for an unsupported or unrecognized version code.
  • Method Details

    • values

      public static DBFVersion[] 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

      public static DBFVersion valueOf(String name)
      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 name
      NullPointerException - 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

      public String getDescription()
      Gets a human-readable description of the DBF version.
      Returns:
      The version description.
    • fromByte

      public static DBFVersion fromByte(byte b)
      Factory method to resolve the DBFVersion from 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, or UNKNOWN if no match is found.