java.lang.Object
java.lang.Enum<Decoder.Type>
com.maxmind.db.Decoder.Type
All Implemented Interfaces:
Serializable, Comparable<Decoder.Type>, java.lang.constant.Constable
Enclosing class:
Decoder

static enum Decoder.Typeextends Enum<Decoder.Type>
Enumeration of data types supported in MaxMind DB format.
  • Enum Constant Details

    • EXTENDED

      public static final Decoder.Type EXTENDED
      Extended type
    • POINTER

      public static final Decoder.Type POINTER
      Pointer type
    • UTF8_STRING

      public static final Decoder.Type UTF8_STRING
      UTF-8 string type
    • DOUBLE

      public static final Decoder.Type DOUBLE
      Double type
    • BYTES

      public static final Decoder.Type BYTES
      Bytes type
    • UINT16

      public static final Decoder.Type UINT16
      Unsigned 16-bit integer
    • UINT32

      public static final Decoder.Type UINT32
      Unsigned 32-bit integer
    • MAP

      public static final Decoder.Type MAP
      Map type
    • INT32

      public static final Decoder.Type INT32
      Signed 32-bit integer
    • UINT64

      public static final Decoder.Type UINT64
      Unsigned 64-bit integer
    • UINT128

      public static final Decoder.Type UINT128
      Unsigned 128-bit integer
    • ARRAY

      public static final Decoder.Type ARRAY
      Array type
    • CONTAINER

      public static final Decoder.Type CONTAINER
      Container type
    • END_MARKER

      public static final Decoder.Type END_MARKER
      End marker
    • BOOLEAN

      public static final Decoder.Type BOOLEAN
      Boolean type
    • FLOAT

      public static final Decoder.Type FLOAT
      Float type
  • Field Details

    • values

      static final Decoder.Type[] values
      Cached copy of Type.values(), to avoid the array clone on every lookup. Worth about 5000 requests per second on the original author's machine.
  • Constructor Details

    • Type

      private Type()
  • Method Details

    • values

      public static Decoder.Type[] 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 Decoder.Type 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
    • get

      public static Decoder.Type get(int i)
      Return the data type stored at an index in this enum's declaration order.
      Parameters:
      i - the zero-based index into the Type values array
      Returns:
      the Type constant at that index
    • get

      private static Decoder.Type get(byte b)
      Returns the type described by a control byte.
      Parameters:
      b - the control byte to interpret
      Returns:
      the type and its payload size
    • fromControlByte

      public static Decoder.Type fromControlByte(int b)
      Determine the data type encoded in the leading bits of a control byte.
      Parameters:
      b - the control byte, whose top 3 bits encode the data type
      Returns:
      the type encoded in the top 3 bits of b