Package com.amazon.ion.impl
Class _Private_IonConstants
- java.lang.Object
-
- com.amazon.ion.impl._Private_IonConstants
-
public final class _Private_IonConstants extends java.lang.ObjectNOT FOR APPLICATION USE!
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class_Private_IonConstants.HighNibble
-
Field Summary
Fields Modifier and Type Field Description static intBB_INT64_LEN_MAXstatic intBB_MAX_7BIT_INTstatic intBB_TOKEN_LENstatic intBB_VAR_INT32_LEN_MAXstatic intBB_VAR_INT64_LEN_MAXstatic intBB_VAR_LEN_MINstatic byte[]BINARY_VERSION_MARKER_1_0The byte sequence indicating use of Ion 1.0 binary format.static intBINARY_VERSION_MARKER_SIZEThe number of bytes inBINARY_VERSION_MARKER_1_0().static intFalsestatic inthigh_surrogate_valuestatic intINT32_SIZEstatic intlnBooleanFalsestatic intlnBooleanTruestatic intlnIsEmptyContainerstatic intlnIsNullstatic intlnIsNullAtomstatic intlnIsNullSequencestatic intlnIsNullStructstatic intlnIsOrderedStructstatic intlnIsVarLenstatic intlnNumericZerostatic intlow_surrogate_valuestatic intMAX_LONG_TEXT_SIZEmaximum size of textual representation of along.static intsurrogate_maskstatic intsurrogate_utf32_offsetstatic intsurrogate_utf32_shiftstatic intsurrogate_value_maskstatic inttidBlobstatic inttidBooleanstatic inttidClobstatic inttidDATAGRAMstatic inttidDecimalstatic inttidFloatstatic inttidListstatic inttidNegIntstatic inttidNopPadstatic inttidNullstatic inttidPosIntstatic inttidSexpstatic inttidStringstatic inttidStructstatic inttidSymbolstatic inttidTimestampstatic inttidTypedeclstatic inttidUnusedstatic intTruestatic java.lang.StringUNKNOWN_SYMBOL_TEXT_PREFIXPrefix string used in IonStructs' equality checks.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetLowNibble(int td)static intgetTypeCode(int td)Extract the type code (high nibble) from a type descriptor.static booleanisHighSurrogate(int c)static booleanisLowSurrogate(int c)static booleanisSurrogate(int c)static intmakeHighSurrogate(int unicodeScalar)static intmakeLowSurrogate(int unicodeScalar)static intmakeTypeDescriptor(int highNibble, int lowNibble)Make a type descriptor from two nibbles; all of which are represented as ints.static intmakeUnicodeScalar(int high_surrogate, int low_surrogate)
-
-
-
Field Detail
-
BB_TOKEN_LEN
public static final int BB_TOKEN_LEN
- See Also:
- Constant Field Values
-
BB_VAR_INT32_LEN_MAX
public static final int BB_VAR_INT32_LEN_MAX
- See Also:
- Constant Field Values
-
BB_VAR_INT64_LEN_MAX
public static final int BB_VAR_INT64_LEN_MAX
- See Also:
- Constant Field Values
-
BB_INT64_LEN_MAX
public static final int BB_INT64_LEN_MAX
- See Also:
- Constant Field Values
-
BB_VAR_LEN_MIN
public static final int BB_VAR_LEN_MIN
- See Also:
- Constant Field Values
-
BB_MAX_7BIT_INT
public static final int BB_MAX_7BIT_INT
- See Also:
- Constant Field Values
-
INT32_SIZE
public static final int INT32_SIZE
- See Also:
- Constant Field Values
-
MAX_LONG_TEXT_SIZE
public static final int MAX_LONG_TEXT_SIZE
maximum size of textual representation of along.
-
high_surrogate_value
public static final int high_surrogate_value
- See Also:
- Constant Field Values
-
low_surrogate_value
public static final int low_surrogate_value
- See Also:
- Constant Field Values
-
surrogate_mask
public static final int surrogate_mask
- See Also:
- Constant Field Values
-
surrogate_value_mask
public static final int surrogate_value_mask
- See Also:
- Constant Field Values
-
surrogate_utf32_offset
public static final int surrogate_utf32_offset
- See Also:
- Constant Field Values
-
surrogate_utf32_shift
public static final int surrogate_utf32_shift
- See Also:
- Constant Field Values
-
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 inBINARY_VERSION_MARKER_1_0().
-
tidNull
public static final int tidNull
- See Also:
- Constant Field Values
-
tidBoolean
public static final int tidBoolean
- See Also:
- Constant Field Values
-
tidPosInt
public static final int tidPosInt
- See Also:
- Constant Field Values
-
tidNegInt
public static final int tidNegInt
- See Also:
- Constant Field Values
-
tidFloat
public static final int tidFloat
- See Also:
- Constant Field Values
-
tidDecimal
public static final int tidDecimal
- See Also:
- Constant Field Values
-
tidTimestamp
public static final int tidTimestamp
- See Also:
- Constant Field Values
-
tidSymbol
public static final int tidSymbol
- See Also:
- Constant Field Values
-
tidString
public static final int tidString
- See Also:
- Constant Field Values
-
tidClob
public static final int tidClob
- See Also:
- Constant Field Values
-
tidBlob
public static final int tidBlob
- See Also:
- Constant Field Values
-
tidList
public static final int tidList
- See Also:
- Constant Field Values
-
tidSexp
public static final int tidSexp
- See Also:
- Constant Field Values
-
tidStruct
public static final int tidStruct
- See Also:
- Constant Field Values
-
tidTypedecl
public static final int tidTypedecl
- See Also:
- Constant Field Values
-
tidUnused
public static final int tidUnused
- See Also:
- Constant Field Values
-
tidDATAGRAM
public static final int tidDATAGRAM
- See Also:
- Constant Field Values
-
tidNopPad
public static final int tidNopPad
- See Also:
- Constant Field Values
-
lnIsNull
public static final int lnIsNull
- See Also:
- Constant Field Values
-
lnIsNullAtom
public static final int lnIsNullAtom
- See Also:
- Constant Field Values
-
lnIsNullSequence
public static final int lnIsNullSequence
- See Also:
- Constant Field Values
-
lnIsNullStruct
public static final int lnIsNullStruct
- See Also:
- Constant Field Values
-
lnIsEmptyContainer
public static final int lnIsEmptyContainer
- See Also:
- Constant Field Values
-
lnIsOrderedStruct
public static final int lnIsOrderedStruct
- See Also:
- Constant Field Values
-
lnIsVarLen
public static final int lnIsVarLen
- See Also:
- Constant Field Values
-
lnBooleanTrue
public static final int lnBooleanTrue
- See Also:
- Constant Field Values
-
lnBooleanFalse
public static final int lnBooleanFalse
- See Also:
- Constant Field Values
-
lnNumericZero
public static final int lnNumericZero
- See Also:
- Constant Field Values
-
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)
-
-