public final class SmileConstants extends Object
SmileGenerator and SmileParser| Modifier and Type | Field and Description | 
|---|---|
| static byte | BYTE_MARKER_END_OF_CONTENTIn addition we can use a marker to allow simple framing; splitting
 of physical data (like file) into distinct logical sections like
 JSON documents. | 
| static byte | BYTE_MARKER_END_OF_STRING | 
| static int | HEADER_BIT_HAS_RAW_BINARYIndicator bit that indicates whether encoded content may
 contain raw (unquoted) binary values. | 
| static int | HEADER_BIT_HAS_SHARED_NAMESIndicator bit that indicates whether encoded content may 
 have Shared names (back references to recently encoded field
 names). | 
| static int | HEADER_BIT_HAS_SHARED_STRING_VALUESIndicator bit that indicates whether encoded content may
 have shared String values (back references to recently encoded
 'short' String values, where short is defined as 64 bytes or less). | 
| static byte | HEADER_BYTE_1First byte of data header (0x3A) | 
| static byte | HEADER_BYTE_2Second byte of data header (0x29) | 
| static byte | HEADER_BYTE_3Third byte of data header | 
| static byte | HEADER_BYTE_4Fourth byte of data header; contains version nibble, may
 have flags | 
| static int | HEADER_VERSION_0Current version consists of four zero bits (nibble) | 
| static int | INT_MARKER_END_OF_STRINGWe need a byte marker to denote end of variable-length Strings. | 
| static int | INT_MISC_BINARY_7BIT | 
| static int | INT_MISC_BINARY_RAW | 
| static int | MAX_SHARED_NAMESLongest back reference we use for field names is 10 bits; no point
 in keeping much more around | 
| static int | MAX_SHARED_STRING_LENGTH_BYTESAlso: whereas we can refer to names of any length, we will only consider
 text values that are considered "tiny" or "short" (ones encoded with
 length prefix); this value thereby has to be maximum length of Strings
 that can be encoded as such. | 
| static int | MAX_SHARED_STRING_VALUESLongest back reference we use for short shared String values is 10 bits,
 so up to (1 << 10) values to keep track of. | 
| static int | MAX_SHORT_NAME_ANY_BYTESRegardless of ASCII/non-ASCII aspect, maximum byte length for any
 short name is then 64 bytes. | 
| static int | MAX_SHORT_NAME_ASCII_BYTESMaximum byte length for short ASCII names is 64. | 
| static int | MAX_SHORT_NAME_UNICODE_BYTESMaximum byte length for short non-ASCII names is slightly
 less due to having to reserve bytes 0xF8 and above (but
 we get one more as values 0 and 1 are not valid) | 
| static int | MAX_SHORT_VALUE_STRING_BYTESEncoding has special "short" forms for value Strings that can
 be represented by 64 bytes of UTF-8 or less. | 
| static int | MIN_BUFFER_FOR_POSSIBLE_SHORT_STRINGAnd to make encoding logic tight and simple, we can always
 require that output buffer has this amount of space
 available before encoding possibly short String (3 bytes since
 longest UTF-8 encoded Java char is 3 bytes). | 
| static int[] | sUtf8UnitLengthsAdditionally we can combine UTF-8 decoding info into similar
 data table. | 
| static byte | TOKEN_KEY_EMPTY_STRINGLet's use same code for empty key as for empty String value | 
| static byte | TOKEN_KEY_LONG_STRING | 
| static byte | TOKEN_LITERAL_EMPTY_STRING | 
| static byte | TOKEN_LITERAL_END_ARRAY | 
| static byte | TOKEN_LITERAL_END_OBJECT | 
| static byte | TOKEN_LITERAL_FALSE | 
| static byte | TOKEN_LITERAL_NULL | 
| static byte | TOKEN_LITERAL_START_ARRAY | 
| static byte | TOKEN_LITERAL_START_OBJECT | 
| static byte | TOKEN_LITERAL_TRUE | 
| static byte | TOKEN_MISC_BINARY_7BITType (for misc, other) used
 for "safe" (encoded by only using 7 LSB, giving 8/7 expansion ratio). | 
| static byte | TOKEN_MISC_BINARY_RAWRaw binary data marker is specifically chosen as separate from
 other types, since it can have significant impact on framing
 (or rather fast scanning based on structure and framing markers). | 
| static int | TOKEN_MISC_FLOAT_32Numeric subtype (2 LSB) for
 indicating 32-bit IEEE single precision floating point number. | 
| static int | TOKEN_MISC_FLOAT_64Numeric subtype (2 LSB)
 indicating 64-bit IEEE double precision floating point number. | 
| static int | TOKEN_MISC_FLOAT_BIGNumeric subtype (2 LSB) for
 indicating  BigDecimaltype. | 
| static int | TOKEN_MISC_INTEGER_32Numeric subtype (2 LSB)
 indicating 32-bit integer (int) | 
| static int | TOKEN_MISC_INTEGER_64Numeric subtype (2 LSB)
 indicating 32-bit integer (long) | 
| static int | TOKEN_MISC_INTEGER_BIGNumeric subtype (2 LSB) for
 indicating  BigIntegertype. | 
| static byte | TOKEN_MISC_LONG_TEXT_ASCIIType (for misc, other) used for
 variable length UTF-8 encoded text, when it is known to only contain ASCII chars. | 
| static byte | TOKEN_MISC_LONG_TEXT_UNICODEType (for misc, other) used
 for variable length UTF-8 encoded text, when it is NOT known to only contain ASCII chars
 (which means it MAY have multi-byte characters)
 Note: 2 LSB are reserved for future use; must be zeroes for now | 
| static int | TOKEN_PREFIX_FP | 
| static int | TOKEN_PREFIX_INTEGER | 
| static int | TOKEN_PREFIX_KEY_ASCII | 
| static int | TOKEN_PREFIX_KEY_SHARED_LONG | 
| static int | TOKEN_PREFIX_KEY_SHARED_SHORT | 
| static int | TOKEN_PREFIX_KEY_UNICODE | 
| static int | TOKEN_PREFIX_MISC_OTHER | 
| static int | TOKEN_PREFIX_SHARED_STRING_LONG | 
| static int | TOKEN_PREFIX_SHARED_STRING_SHORT | 
| static int | TOKEN_PREFIX_SHORT_UNICODE | 
| static int | TOKEN_PREFIX_SMALL_ASCII | 
| static int | TOKEN_PREFIX_SMALL_INT | 
| static int | TOKEN_PREFIX_TINY_ASCII | 
| static int | TOKEN_PREFIX_TINY_UNICODE | 
| Constructor and Description | 
|---|
| SmileConstants() | 
public static final int MAX_SHORT_VALUE_STRING_BYTES
public static final int MAX_SHORT_NAME_ASCII_BYTES
public static final int MAX_SHORT_NAME_UNICODE_BYTES
public static final int MAX_SHORT_NAME_ANY_BYTES
public static final int MAX_SHARED_NAMES
public static final int MAX_SHARED_STRING_VALUES
public static final int MAX_SHARED_STRING_LENGTH_BYTES
public static final int MIN_BUFFER_FOR_POSSIBLE_SHORT_STRING
public static final int INT_MARKER_END_OF_STRING
public static final byte BYTE_MARKER_END_OF_STRING
public static final byte BYTE_MARKER_END_OF_CONTENT
public static final byte HEADER_BYTE_1
public static final byte HEADER_BYTE_2
public static final byte HEADER_BYTE_3
public static final int HEADER_VERSION_0
public static final byte HEADER_BYTE_4
public static final int HEADER_BIT_HAS_SHARED_NAMES
public static final int HEADER_BIT_HAS_SHARED_STRING_VALUES
public static final int HEADER_BIT_HAS_RAW_BINARY
Note that this bit being true does not automatically mean that such raw binary content indeed exists; just that it may exist. This because header is written before any binary data may be written.
public static final int TOKEN_PREFIX_INTEGER
public static final int TOKEN_PREFIX_FP
public static final int TOKEN_PREFIX_SHARED_STRING_SHORT
public static final int TOKEN_PREFIX_SHARED_STRING_LONG
public static final int TOKEN_PREFIX_TINY_ASCII
public static final int TOKEN_PREFIX_SMALL_ASCII
public static final int TOKEN_PREFIX_TINY_UNICODE
public static final int TOKEN_PREFIX_SHORT_UNICODE
public static final int TOKEN_PREFIX_SMALL_INT
public static final int TOKEN_PREFIX_MISC_OTHER
public static final byte TOKEN_LITERAL_EMPTY_STRING
public static final byte TOKEN_LITERAL_NULL
public static final byte TOKEN_LITERAL_FALSE
public static final byte TOKEN_LITERAL_TRUE
public static final byte TOKEN_LITERAL_START_ARRAY
public static final byte TOKEN_LITERAL_END_ARRAY
public static final byte TOKEN_LITERAL_START_OBJECT
public static final byte TOKEN_LITERAL_END_OBJECT
public static final int INT_MISC_BINARY_7BIT
public static final int INT_MISC_BINARY_RAW
public static final byte TOKEN_MISC_LONG_TEXT_ASCII
public static final byte TOKEN_MISC_LONG_TEXT_UNICODE
public static final byte TOKEN_MISC_BINARY_7BIT
public static final byte TOKEN_MISC_BINARY_RAW
public static final int TOKEN_MISC_INTEGER_32
public static final int TOKEN_MISC_INTEGER_64
public static final int TOKEN_MISC_INTEGER_BIG
BigInteger type.public static final int TOKEN_MISC_FLOAT_32
public static final int TOKEN_MISC_FLOAT_64
public static final int TOKEN_MISC_FLOAT_BIG
BigDecimal type.public static final byte TOKEN_KEY_EMPTY_STRING
public static final int TOKEN_PREFIX_KEY_SHARED_LONG
public static final byte TOKEN_KEY_LONG_STRING
public static final int TOKEN_PREFIX_KEY_SHARED_SHORT
public static final int TOKEN_PREFIX_KEY_ASCII
public static final int TOKEN_PREFIX_KEY_UNICODE
public static final int[] sUtf8UnitLengths
Copyright © 2017 FasterXML. All rights reserved.