Class _Private_IonConstants


  • public final class _Private_IonConstants
    extends java.lang.Object
    NOT FOR APPLICATION USE!
    • Field Detail

      • MAX_LONG_TEXT_SIZE

        public static final int MAX_LONG_TEXT_SIZE
        maximum size of textual representation of a long.
      • 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 ().
      • True

        public static final int True
      • False

        public static final int False
      • UNKNOWN_SYMBOL_TEXT_PREFIX

        public static final java.lang.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:
        Constant Field Values
    • Method Detail

      • 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)