Class _Private_IonConstants

java.lang.Object
com.amazon.ion.impl._Private_IonConstants

public final class _Private_IonConstants extends Object
NOT FOR APPLICATION USE!
  • Field Details

    • BB_TOKEN_LEN

      public static final int BB_TOKEN_LEN
      See Also:
    • BB_VAR_INT32_LEN_MAX

      public static final int BB_VAR_INT32_LEN_MAX
      See Also:
    • BB_VAR_INT64_LEN_MAX

      public static final int BB_VAR_INT64_LEN_MAX
      See Also:
    • BB_INT64_LEN_MAX

      public static final int BB_INT64_LEN_MAX
      See Also:
    • BB_VAR_LEN_MIN

      public static final int BB_VAR_LEN_MIN
      See Also:
    • BB_MAX_7BIT_INT

      public static final int BB_MAX_7BIT_INT
      See Also:
    • INT32_SIZE

      public static final int INT32_SIZE
      See Also:
    • MAX_LONG_TEXT_SIZE

      public static final int MAX_LONG_TEXT_SIZE
      maximum size of textual representation of a long.
    • high_surrogate_value

      public static final int high_surrogate_value
      See Also:
    • low_surrogate_value

      public static final int low_surrogate_value
      See Also:
    • surrogate_mask

      public static final int surrogate_mask
      See Also:
    • surrogate_value_mask

      public static final int surrogate_value_mask
      See Also:
    • surrogate_utf32_offset

      public static final int surrogate_utf32_offset
      See Also:
    • surrogate_utf32_shift

      public static final int surrogate_utf32_shift
      See Also:
    • BINARY_VERSION_MARKER_1_0

      public static final byte[] BINARY_VERSION_MARKER_1_0
      The byte sequence indicating use of Ion 1.0 binary format.
    • BINARY_VERSION_MARKER_SIZE

      public static final int BINARY_VERSION_MARKER_SIZE
      The number of bytes in BINARY_VERSION_MARKER_1_0.
    • tidNull

      public static final int tidNull
      See Also:
    • tidBoolean

      public static final int tidBoolean
      See Also:
    • tidPosInt

      public static final int tidPosInt
      See Also:
    • tidNegInt

      public static final int tidNegInt
      See Also:
    • tidFloat

      public static final int tidFloat
      See Also:
    • tidDecimal

      public static final int tidDecimal
      See Also:
    • tidTimestamp

      public static final int tidTimestamp
      See Also:
    • tidSymbol

      public static final int tidSymbol
      See Also:
    • tidString

      public static final int tidString
      See Also:
    • tidClob

      public static final int tidClob
      See Also:
    • tidBlob

      public static final int tidBlob
      See Also:
    • tidList

      public static final int tidList
      See Also:
    • tidSexp

      public static final int tidSexp
      See Also:
    • tidStruct

      public static final int tidStruct
      See Also:
    • tidTypedecl

      public static final int tidTypedecl
      See Also:
    • tidUnused

      public static final int tidUnused
      See Also:
    • tidDATAGRAM

      public static final int tidDATAGRAM
      See Also:
    • tidNopPad

      public static final int tidNopPad
      See Also:
    • lnIsNull

      public static final int lnIsNull
      See Also:
    • lnIsNullAtom

      public static final int lnIsNullAtom
      See Also:
    • lnIsNullSequence

      public static final int lnIsNullSequence
      See Also:
    • lnIsNullStruct

      public static final int lnIsNullStruct
      See Also:
    • lnIsEmptyContainer

      public static final int lnIsEmptyContainer
      See Also:
    • lnIsOrderedStruct

      public static final int lnIsOrderedStruct
      See Also:
    • lnIsVarLen

      public static final int lnIsVarLen
      See Also:
    • lnBooleanTrue

      public static final int lnBooleanTrue
      See Also:
    • lnBooleanFalse

      public static final int lnBooleanFalse
      See Also:
    • lnNumericZero

      public static final int lnNumericZero
      See Also:
    • True

      public static final int True
    • False

      public static final int False
    • UNKNOWN_SYMBOL_TEXT_PREFIX

      public static final String UNKNOWN_SYMBOL_TEXT_PREFIX
      Prefix string used in IonStructs' equality checks. When a IonValue's field name's text is unknown, this String is prepended to the field name's SID to coerce it to a string to be used as the key. This will eliminate collisions with IonValues with numbers as their field names.

      For example, these two IonValues (nested in the IonStructs) will have distinct keys:

       {"$99":random_value},
       {$99:random_value}
       

      TODO amazon-ion/ion-java/issues/23 However, there is still a potential failure if one of the IonStruct's nested value has a field name with text " -- UNKNOWN SYMBOL TEXT -- $123", and that another nested value of an IonStruct has a field name with unknown text and sid 123, these two values will be considered a match within IonStruct's equality checks, which is wrong.

      See IonAssert for another use of this idiom.

      See Also:
  • Method Details

    • makeUnicodeScalar

      public static final int makeUnicodeScalar(int high_surrogate, int low_surrogate)
    • makeHighSurrogate

      public static final int makeHighSurrogate(int unicodeScalar)
    • makeLowSurrogate

      public static final int makeLowSurrogate(int unicodeScalar)
    • isHighSurrogate

      public static final boolean isHighSurrogate(int c)
    • isLowSurrogate

      public static final boolean isLowSurrogate(int c)
    • isSurrogate

      public static final boolean isSurrogate(int c)
    • makeTypeDescriptor

      public static final int makeTypeDescriptor(int highNibble, int lowNibble)
      Make a type descriptor from two nibbles; all of which are represented as ints.
      Parameters:
      highNibble - must be a positive int between 0x00 and 0x0F.
      lowNibble - must be a positive int between 0x00 and 0x0F.
      Returns:
      the combined nibbles, between 0x00 and 0xFF.
    • getTypeCode

      public static final int getTypeCode(int td)
      Extract the type code (high nibble) from a type descriptor.
      Parameters:
      td - must be a positive int between 0x00 and 0xFF.
      Returns:
      the high nibble of the input byte, between 0x00 and 0x0F.
    • getLowNibble

      public static final int getLowNibble(int td)