public static interface JSONB.IO
| Modifier and Type | Method and Description |
|---|---|
static int |
checkAndWriteTypeName(byte[] bytes,
int off,
java.lang.Object object,
java.lang.Class<?> fieldClass,
JSONWriter jsonWriter)
Checks and writes a type name to a byte array
|
static int |
enumCapacity(java.lang.Enum e,
long features)
Calculates the capacity needed for an enum
|
static int |
int64Capacity(java.util.Collection<java.lang.Long> values)
Calculates the capacity needed for a collection of Long values
|
static int |
putStringSizeLarge(byte[] bytes,
int off,
int strlen)
Puts a large string size to a byte array
|
static int |
putStringSizeSmall(byte[] bytes,
int off,
int val)
Puts a small string size to a byte array
|
static int |
sizeOfInt(int i)
Calculates the size needed for an integer value
|
static int |
startArray(byte[] bytes,
int off,
int size)
Starts an array in a byte array
|
static int |
stringCapacity(java.util.Collection<java.lang.String> strings)
Calculates the capacity needed for a collection of strings
|
static int |
stringCapacity(java.lang.String str)
Calculates the capacity needed for a string
|
static int |
stringCapacity(java.lang.String[] strings)
Calculates the capacity needed for a string array
|
static int |
writeBoolean(byte[] bytes,
int off,
boolean value)
Writes a boolean value to a byte array
|
static int |
writeBoolean(byte[] bytes,
int off,
java.lang.Boolean value)
Writes a Boolean value to a byte array
|
static int |
writeBoolean(byte[] bytes,
int off,
boolean[] values)
Writes a boolean array to a byte array
|
static int |
writeDouble(byte[] bytes,
int off,
double value)
Writes a double value to a byte array
|
static int |
writeDouble(byte[] bytes,
int off,
double[] values)
Writes a double array to a byte array
|
static int |
writeDouble(byte[] bytes,
int off,
java.lang.Double value,
long features)
Writes a Double value to a byte array
|
static int |
writeEnum(byte[] bytes,
int off,
java.lang.Enum e,
long features)
Writes an enum value to a byte array
|
static int |
writeFloat(byte[] bytes,
int off,
float value)
Writes a float value to a byte array
|
static int |
writeFloat(byte[] bytes,
int off,
float[] values)
Writes a float array to a byte array
|
static int |
writeFloat(byte[] bytes,
int off,
java.lang.Float value,
long features)
Writes a Float value to a byte array
|
static int |
writeInstant(byte[] bytes,
int off,
java.time.Instant value)
Writes an Instant value to a byte array
|
static int |
writeInt16(byte[] bytes,
int off,
short val)
Writes a short value to a byte array
|
static int |
writeInt16(byte[] bytes,
int off,
java.lang.Short val,
long features)
Writes a Short value to a byte array
|
static int |
writeInt32(byte[] bytes,
int off,
int value)
Writes an integer value to a byte array
|
static int |
writeInt32(byte[] bytes,
int off,
java.lang.Integer value,
long features)
Writes an Integer value to a byte array
|
static int |
writeInt64(byte[] bytes,
int off,
java.util.Collection<java.lang.Long> values,
long features)
Writes a collection of Long values to a byte array
|
static int |
writeInt64(byte[] bytes,
int off,
long value)
Writes a long value to a byte array
|
static int |
writeInt64(byte[] bytes,
int off,
java.lang.Long value,
long features)
Writes a Long value to a byte array
|
static int |
writeInt8(byte[] bytes,
int off,
byte val)
Writes a byte value to a byte array
|
static int |
writeInt8(byte[] bytes,
int off,
java.lang.Byte val,
long features)
Writes a Byte value to a byte array
|
static int |
writeLocalDate(byte[] bytes,
int off,
java.time.LocalDate value)
Writes a LocalDate value to a byte array
|
static int |
writeLocalDateTime(byte[] bytes,
int off,
java.time.LocalDateTime value)
Writes a LocalDateTime value to a byte array
|
static int |
writeLocalTime(byte[] bytes,
int off,
java.time.LocalTime value)
Writes a LocalTime value to a byte array
|
static int |
writeNameRaw(byte[] bytes,
int off,
byte[] name,
long nameHash,
JSONWriter jsonWriter)
Writes a raw name to a byte array
|
static int |
writeOffsetDateTime(byte[] bytes,
int off,
java.time.OffsetDateTime value)
Writes an OffsetDateTime value to a byte array
|
static int |
writeOffsetTime(byte[] bytes,
int off,
java.time.OffsetTime value)
Writes an OffsetTime value to a byte array
|
static int |
writeReference(byte[] bytes,
int off,
java.lang.String path,
JSONWriter jsonWriter)
Writes a reference to a byte array
|
static int |
writeString(byte[] bytes,
int off,
char[] chars)
Writes a character array to a byte array
|
static int |
writeString(byte[] bytes,
int off,
char[] chars,
int coff,
int strlen)
Writes a character array with offset and length to a byte array
|
static int |
writeString(byte[] bytes,
int off,
java.util.Collection<java.lang.String> strings,
long features)
Writes a collection of strings to a byte array
|
static int |
writeString(byte[] bytes,
int off,
java.lang.String str)
Writes a string to a byte array
|
static int |
writeString(byte[] bytes,
int off,
java.lang.String[] strings,
long features)
Writes a string array to a byte array
|
static int |
writeStringLatin1(byte[] bytes,
int off,
byte[] value)
Writes a Latin-1 string to a byte array
|
static int |
writeStringLatin1(byte[] bytes,
int off,
char[] chars,
int coff,
int strlen)
Writes a Latin-1 character array to a byte array
|
static int |
writeStringUTF16(byte[] bytes,
int off,
byte[] value)
Writes a UTF-16 string to a byte array
|
static int |
writeSymbol(byte[] bytes,
int off,
int symbol)
Writes a symbol to a byte array
|
static int |
writeSymbol(byte[] bytes,
int off,
java.lang.String str,
SymbolTable symbolTable)
Writes a string with a symbol table to a byte array
|
static int |
writeTypeName(byte[] bytes,
int off,
java.lang.String typeName,
JSONWriter jsonWriter)
Writes a type name to a byte array
|
static int |
writeUTF8(byte[] bytes,
int off,
char[] chars,
int coff,
int strlen)
Writes a UTF-8 character array to a byte array
|
static int |
writeUUID(byte[] bytes,
int off,
java.util.UUID value)
Writes a UUID value to a byte array
|
static int enumCapacity(java.lang.Enum e,
long features)
e - the enum valuefeatures - the features to applystatic int writeEnum(byte[] bytes,
int off,
java.lang.Enum e,
long features)
bytes - the byte array to write tooff - the offset in the byte arraye - the enum value to writefeatures - the features to applystatic int writeBoolean(byte[] bytes,
int off,
java.lang.Boolean value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Boolean value to writestatic int writeBoolean(byte[] bytes,
int off,
boolean value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the boolean value to writestatic int writeBoolean(byte[] bytes,
int off,
boolean[] values)
bytes - the byte array to write tooff - the offset in the byte arrayvalues - the boolean array to writestatic int writeFloat(byte[] bytes,
int off,
java.lang.Float value,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Float value to writefeatures - the features to applystatic int writeFloat(byte[] bytes,
int off,
float[] values)
bytes - the byte array to write tooff - the offset in the byte arrayvalues - the float array to writestatic int writeFloat(byte[] bytes,
int off,
float value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the float value to writestatic int writeDouble(byte[] bytes,
int off,
java.lang.Double value,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Double value to writefeatures - the features to applystatic int writeDouble(byte[] bytes,
int off,
double value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the double value to writestatic int writeDouble(byte[] bytes,
int off,
double[] values)
bytes - the byte array to write tooff - the offset in the byte arrayvalues - the double array to writestatic int writeInt8(byte[] bytes,
int off,
java.lang.Byte val,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayval - the Byte value to writefeatures - the features to applystatic int writeInt8(byte[] bytes,
int off,
byte val)
bytes - the byte array to write tooff - the offset in the byte arrayval - the byte value to writestatic int writeInt16(byte[] bytes,
int off,
java.lang.Short val,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayval - the Short value to writefeatures - the features to applystatic int writeInt16(byte[] bytes,
int off,
short val)
bytes - the byte array to write tooff - the offset in the byte arrayval - the short value to writestatic int writeInt32(byte[] bytes,
int off,
java.lang.Integer value,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Integer value to writefeatures - the features to applystatic int writeSymbol(byte[] bytes,
int off,
java.lang.String str,
SymbolTable symbolTable)
bytes - the byte array to write tooff - the offset in the byte arraystr - the string to writesymbolTable - the symbol table to usestatic int writeSymbol(byte[] bytes,
int off,
int symbol)
bytes - the byte array to write tooff - the offset in the byte arraysymbol - the symbol to writestatic int checkAndWriteTypeName(byte[] bytes,
int off,
java.lang.Object object,
java.lang.Class<?> fieldClass,
JSONWriter jsonWriter)
bytes - the byte array to write tooff - the offset in the byte arrayobject - the object to checkfieldClass - the field classjsonWriter - the JSON writerstatic int writeTypeName(byte[] bytes,
int off,
java.lang.String typeName,
JSONWriter jsonWriter)
bytes - the byte array to write tooff - the offset in the byte arraytypeName - the type name to writejsonWriter - the JSON writerstatic int writeInt32(byte[] bytes,
int off,
int value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the integer value to writestatic int writeInt64(byte[] bytes,
int off,
java.util.Collection<java.lang.Long> values,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayvalues - the collection of Long values to writefeatures - the features to applystatic int writeInt64(byte[] bytes,
int off,
java.lang.Long value,
long features)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Long value to writefeatures - the features to applystatic int writeInt64(byte[] bytes,
int off,
long value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the long value to writestatic int startArray(byte[] bytes,
int off,
int size)
bytes - the byte array to write tooff - the offset in the byte arraysize - the size of the arraystatic int writeString(byte[] bytes,
int off,
java.util.Collection<java.lang.String> strings,
long features)
bytes - the byte array to write tooff - the offset in the byte arraystrings - the collection of strings to writefeatures - the features to applystatic int writeString(byte[] bytes,
int off,
java.lang.String[] strings,
long features)
bytes - the byte array to write tooff - the offset in the byte arraystrings - the string array to writefeatures - the features to applystatic int writeString(byte[] bytes,
int off,
java.lang.String str)
bytes - the byte array to write tooff - the offset in the byte arraystr - the string to writestatic int writeStringUTF16(byte[] bytes,
int off,
byte[] value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the UTF-16 byte array to writestatic int writeStringLatin1(byte[] bytes,
int off,
byte[] value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Latin-1 byte array to writestatic int stringCapacity(java.util.Collection<java.lang.String> strings)
strings - the collection of stringsstatic int stringCapacity(java.lang.String[] strings)
strings - the string arraystatic int int64Capacity(java.util.Collection<java.lang.Long> values)
values - the collection of Long valuesstatic int stringCapacity(java.lang.String str)
str - the stringstatic int putStringSizeSmall(byte[] bytes,
int off,
int val)
bytes - the byte array to write tooff - the offset in the byte arrayval - the size value to writestatic int putStringSizeLarge(byte[] bytes,
int off,
int strlen)
bytes - the byte array to write tooff - the offset in the byte arraystrlen - the size value to writestatic int writeString(byte[] bytes,
int off,
char[] chars)
bytes - the byte array to write tooff - the offset in the byte arraychars - the character array to writestatic int writeString(byte[] bytes,
int off,
char[] chars,
int coff,
int strlen)
bytes - the byte array to write tooff - the offset in the byte arraychars - the character array to writecoff - the offset in the character arraystrlen - the length of characters to writestatic int writeStringLatin1(byte[] bytes,
int off,
char[] chars,
int coff,
int strlen)
bytes - the byte array to write tooff - the offset in the byte arraychars - the character array to writecoff - the offset in the character arraystrlen - the length of characters to writestatic int writeUTF8(byte[] bytes,
int off,
char[] chars,
int coff,
int strlen)
bytes - the byte array to write tooff - the offset in the byte arraychars - the character array to writecoff - the offset in the character arraystrlen - the length of characters to writestatic int sizeOfInt(int i)
i - the integer valuestatic int writeUUID(byte[] bytes,
int off,
java.util.UUID value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the UUID value to writestatic int writeInstant(byte[] bytes,
int off,
java.time.Instant value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the Instant value to writestatic int writeLocalDate(byte[] bytes,
int off,
java.time.LocalDate value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the LocalDate value to writestatic int writeLocalTime(byte[] bytes,
int off,
java.time.LocalTime value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the LocalTime value to writestatic int writeLocalDateTime(byte[] bytes,
int off,
java.time.LocalDateTime value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the LocalDateTime value to writestatic int writeOffsetDateTime(byte[] bytes,
int off,
java.time.OffsetDateTime value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the OffsetDateTime value to writestatic int writeOffsetTime(byte[] bytes,
int off,
java.time.OffsetTime value)
bytes - the byte array to write tooff - the offset in the byte arrayvalue - the OffsetTime value to writestatic int writeReference(byte[] bytes,
int off,
java.lang.String path,
JSONWriter jsonWriter)
bytes - the byte array to write tooff - the offset in the byte arraypath - the reference pathjsonWriter - the JSON writerstatic int writeNameRaw(byte[] bytes,
int off,
byte[] name,
long nameHash,
JSONWriter jsonWriter)
bytes - the byte array to write tooff - the offset in the byte arrayname - the name byte array to writenameHash - the name hashjsonWriter - the JSON writer