final class JSONWriterUTF8 extends JSONWriter
JSONWriter.Context, JSONWriter.Feature, JSONWriter.Path| Modifier and Type | Field and Description |
|---|---|
(package private) byte[] |
bytes |
private long |
byteVectorQuote |
(package private) JSONFactory.CacheItem |
cacheItem |
(package private) static short |
QUOTE_COLON |
(package private) static short |
QUOTE2_COLON |
(package private) static long |
REF |
attachment, charset, context, jsonb, lastReference, level, MAKS_ERROR_ON_NONE_SERIALIZABLE, MASK_BEAN_TO_ARRAY, MASK_BROWSER_COMPATIBLE, MASK_BROWSER_SECURE, MASK_ESCAPE_NONE_ASCII, MASK_FIELD_BASED, MASK_IGNORE_ERROR_GETTER, MASK_IGNORE_NON_FIELD_GETTER, MASK_IGNORE_NONE_SERIALIZABLE, MASK_NOT_WRITE_DEFAULT_VALUE, MASK_NOT_WRITE_EMPTY_ARRAY, MASK_NOT_WRITE_HASHMAP_ARRAY_LIST_CLASS_NAME, MASK_NOT_WRITE_NUMBER_CLASS_NAME, MASK_NOT_WRITE_ROOT_CLASSNAME, MASK_NULL_AS_DEFAULT_VALUE, MASK_PRETTY_FORMAT, MASK_REFERENCE_DETECTION, MASK_UNQUOTE_FIELD_NAME, MASK_USE_SINGLE_QUOTES, MASK_WRITE_BIG_DECIMAL_AS_PLAIN, MASK_WRITE_BOOLEAN_AS_NUMBER, MASK_WRITE_CLASS_NAME, MASK_WRITE_ENUM_USING_ORDINAL, MASK_WRITE_ENUM_USING_TO_STRING, MASK_WRITE_ENUMS_USING_NAME, MASK_WRITE_FLOAT_SPECIAL_AS_STRING, MASK_WRITE_LONG_AS_STRING, MASK_WRITE_MAP_NULL_VALUE, MASK_WRITE_NON_STRING_KEY_AS_STRING, MASK_WRITE_NON_STRING_VALUE_AS_STRING, MASK_WRITE_NULL_BOOLEAN_AS_FALSE, MASK_WRITE_NULL_LIST_AS_EMPTY, MASK_WRITE_NULL_NUMBER_AS_ZERO, MASK_WRITE_NULL_STRING_AS_EMPTY, MASK_WRITE_PAIR_AS_JAVA_BEAN, maxArraySize, NONE_DIRECT_FEATURES, off, path, pretty, PRETTY_2_SPACE, PRETTY_4_SPACE, PRETTY_NON, PRETTY_TAB, quote, refs, rootObject, startObject, symbolTable, useSingleQuote, utf16, utf8, WRITE_ARRAY_NULL_MASK| Constructor and Description |
|---|
JSONWriterUTF8(JSONWriter.Context ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this JSONWriter and releases any resources associated with it.
|
void |
endArray()
Ends the current JSON array.
|
void |
endObject()
Ends writing a JSON object.
|
java.lang.Object |
ensureCapacity(int minCapacity)
Ensures that the internal buffer has at least the specified minimum capacity.
|
private static long |
expand(long i)
A faster alternative that is functionally equivalent to Long.expand(i, 0x0F0F_0F0F_0F0F_0F0FL)
|
int |
flushTo(java.io.OutputStream to)
Flushes the content of this JSONWriter to the specified OutputStream.
|
int |
flushTo(java.io.OutputStream out,
java.nio.charset.Charset charset)
Flushes the content of this JSONWriter to the specified OutputStream using the specified charset.
|
byte[] |
getBytes()
Gets the content of the output buffer as a byte array.
|
byte[] |
getBytes(java.nio.charset.Charset charset)
Gets the content of the output buffer as a byte array using the specified charset.
|
private byte[] |
grow(int minCapacity) |
private void |
grow0(int minCapacity) |
private byte[] |
grow1(int off) |
private static long |
hex8(long i)
Extract the least significant 4 bytes from the input integer i, convert each byte into its corresponding 2-digit
hexadecimal representation, concatenate these hexadecimal strings into one continuous string, and then interpret
this string as a hexadecimal number to form and return a long value.
|
private int |
indent(byte[] bytes,
int off) |
int |
size()
Gets the current size of the output buffer.
|
void |
startArray()
Starts writing a JSON array.
|
void |
startObject()
Starts writing a JSON object.
|
java.lang.String |
toString() |
void |
write(java.util.List array)
Writes a list as a JSON array.
|
void |
write(java.util.Map<?,?> map)
Writes a Map as a JSON object.
|
protected void |
write0(char c)
Writes a character to the output.
|
void |
writeBase64(byte[] value)
Writes a byte array as Base64-encoded string.
|
void |
writeBigInt(java.math.BigInteger value,
long features)
Writes a BigInteger value using the specified features.
|
void |
writeBool(boolean value)
Writes a boolean value.
|
void |
writeChar(char ch)
Writes a character without any escaping or formatting.
|
void |
writeColon()
Writes a colon separator.
|
void |
writeComma()
Writes a comma separator.
|
void |
writeDateTime14(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second)
Writes a date-time value in 14-character format (yyyyMMddHHmmss).
|
void |
writeDateTime19(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second)
Writes a date-time value in 19-character format (yyyy-MM-dd HH:mm:ss).
|
void |
writeDateTimeISO8601(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second,
int millis,
int offsetSeconds,
boolean timeZone)
Writes a date-time value in ISO8601 format.
|
void |
writeDateYYYMMDD10(int year,
int month,
int dayOfMonth)
Writes a date in 10-character format (yyyy-MM-dd).
|
void |
writeDateYYYMMDD8(int year,
int month,
int dayOfMonth)
Writes a date in 8-character format (yyyyMMdd).
|
void |
writeDecimal(java.math.BigDecimal value,
long features,
java.text.DecimalFormat format)
Writes a BigDecimal value using the specified features and decimal format.
|
void |
writeDouble(double value)
Writes a double value.
|
void |
writeDouble(double[] values)
Writes a double array as floating-point numbers.
|
void |
writeFloat(float value)
Writes a float value.
|
void |
writeFloat(float[] values) |
void |
writeHex(byte[] values)
Writes a byte array as hexadecimal string.
|
void |
writeInt16(short i)
Writes a short value as an integer.
|
void |
writeInt32(int i)
Writes an int value.
|
void |
writeInt32(int[] values)
Writes an int array as integers.
|
void |
writeInt32(java.lang.Integer i)
Writes an Integer object.
|
void |
writeInt64(long i)
Writes a long value.
|
void |
writeInt64(java.lang.Long i)
Writes a Long object.
|
void |
writeInt64(long[] values)
Writes a long array as integers.
|
void |
writeInt8(byte i)
Writes a byte value as an integer.
|
void |
writeInt8(byte[] values)
Writes a byte array as integers.
|
void |
writeListInt32(java.util.List<java.lang.Integer> values)
Writes a list of Integer values as integers.
|
void |
writeListInt64(java.util.List<java.lang.Long> values)
Writes a list of Long values as integers.
|
void |
writeLocalDate(java.time.LocalDate date)
Writes a LocalDate value.
|
void |
writeLocalDateTime(java.time.LocalDateTime dateTime)
Writes a LocalDateTime value.
|
void |
writeLocalTime(java.time.LocalTime time)
Writes a LocalTime value.
|
void |
writeName10Raw(long name0,
long name1)
Writes a 10-character field name as raw bytes without any escaping or formatting.
|
void |
writeName11Raw(long name0,
long name1)
Writes an 11-character field name as raw bytes without any escaping or formatting.
|
void |
writeName12Raw(long name0,
long name1)
Writes a 12-character field name as raw bytes without any escaping or formatting.
|
void |
writeName13Raw(long name0,
long name1)
Writes a 13-character field name as raw bytes without any escaping or formatting.
|
void |
writeName14Raw(long name0,
long name1)
Writes a 14-character field name as raw bytes without any escaping or formatting.
|
void |
writeName15Raw(long name0,
long name1)
Writes a 15-character field name as raw bytes without any escaping or formatting.
|
void |
writeName16Raw(long name0,
long name1)
Writes a 16-character field name as raw bytes without any escaping or formatting.
|
void |
writeName2Raw(long name)
Writes a 2-character field name as raw bytes without any escaping or formatting.
|
void |
writeName3Raw(long name)
Writes a 3-character field name as raw bytes without any escaping or formatting.
|
void |
writeName4Raw(long name)
Writes a 4-character field name as raw bytes without any escaping or formatting.
|
void |
writeName5Raw(long name)
Writes a 5-character field name as raw bytes without any escaping or formatting.
|
void |
writeName6Raw(long name)
Writes a 6-character field name as raw bytes without any escaping or formatting.
|
void |
writeName7Raw(long name)
Writes a 7-character field name as raw bytes without any escaping or formatting.
|
void |
writeName8Raw(long name)
Writes an 8-character field name as raw bytes without any escaping or formatting.
|
void |
writeName9Raw(long name0,
int name1)
Writes a 9-character field name as raw bytes without any escaping or formatting.
|
void |
writeNameRaw(byte[] name)
Writes raw bytes representing a field name without any escaping or formatting.
|
void |
writeNameRaw(byte[] name,
int coff,
int len)
Writes raw bytes representing a field name without any escaping or formatting.
|
void |
writeNameRaw(char[] chars)
Writes raw characters representing a field name without any escaping or formatting.
|
void |
writeNameRaw(char[] bytes,
int offset,
int len)
Writes raw characters representing a field name without any escaping or formatting.
|
void |
writeNull()
Writes a null value.
|
void |
writeOffsetDateTime(java.time.OffsetDateTime dateTime)
Writes an OffsetDateTime value.
|
void |
writeOffsetTime(java.time.OffsetTime time)
Writes an OffsetTime value.
|
private void |
writeQuote() |
void |
writeRaw(byte b)
Writes a raw byte without any escaping or formatting.
|
void |
writeRaw(byte[] raw)
Writes raw bytes without any escaping or formatting.
|
void |
writeRaw(char ch)
Writes a raw character without any escaping or formatting.
|
void |
writeRaw(char c0,
char c1)
Writes two raw characters without any escaping or formatting.
|
void |
writeRaw(java.lang.String str)
Writes a raw string without any escaping or formatting.
|
void |
writeReference(java.lang.String path)
Writes a reference to a previously serialized object.
|
void |
writeString(boolean value)
Writes a boolean value as a string.
|
void |
writeString(byte value)
Writes a byte value as a string.
|
void |
writeString(char[] chars)
Writes a string from character array.
|
void |
writeString(char[] chars,
int stroff,
int strlen)
Writes a string from character array with specified offset and length.
|
void |
writeString(char[] chars,
int offset,
int len,
boolean quoted)
Writes a string from character array with specified offset and length.
|
void |
writeString(int value)
Writes an int value as a string.
|
void |
writeString(java.util.List<java.lang.String> list)
Writes a list of strings as a JSON array.
|
void |
writeString(long value)
Writes a long value as a string.
|
void |
writeString(short value)
Writes a short value as a string.
|
void |
writeString(java.lang.String str)
Writes a string value.
|
void |
writeString(java.lang.String[] strings)
Writes an array of strings as a JSON array.
|
protected void |
writeStringEscaped(byte[] values) |
protected void |
writeStringEscapedRest(char[] chars,
int end,
boolean browserSecure,
boolean escapeNoneAscii,
int i) |
private void |
writeStringJDK8(java.lang.String str) |
void |
writeStringLatin1(byte[] value)
Writes a string from Latin-1 encoded bytes.
|
protected void |
writeStringLatin1BrowserSecure(byte[] value) |
void |
writeStringUTF16(byte[] value)
Writes a string from UTF-16 encoded bytes.
|
void |
writeTimeHHMMSS8(int hour,
int minute,
int second)
Writes a time in 8-character format (HH:mm:ss).
|
void |
writeUUID(java.util.UUID value)
Writes a UUID value.
|
void |
writeZonedDateTime(java.time.ZonedDateTime dateTime)
Writes a ZonedDateTime value.
|
addManagerReference, checkAndWriteTypeName, config, config, containsReference, decrementIdent, flushTo, getAttachment, getCharset, getContext, getFeatures, getFeatures, getObjectWriter, getObjectWriter, getObjectWriter, getOffset, getPath, getPath, getSymbolTable, hasFilter, hasFilter, hasFilter, illegalYear, incrementIndent, isBeanToArray, isEnabled, isEnabled, isIgnoreErrorGetter, isIgnoreNoneSerializable, isIgnoreNoneSerializable, isRefDetect, isRefDetect, isUseSingleQuotes, isUTF16, isUTF8, isWriteAsString, isWriteAsString, isWriteAsString, isWriteMapTypeInfo, isWriteNulls, isWriteTypeInfo, isWriteTypeInfo, isWriteTypeInfo, isWriteTypeInfo, isWriteTypeInfo, isWriteTypeInfo, level, newCapacity, of, of, of, of, ofJSONB, ofJSONB, ofJSONB, ofJSONB, ofJSONB, ofPretty, ofPretty, ofUTF16, ofUTF8, ofUTF8, ofUTF8, overflowLevel, popPath, popPath0, println, removeReference, setAttachment, setOffset, setPath, setPath, setPath, setPath0, setPath0, setRootObject, startArray, startArray, startArray0, startArray1, startArray10, startArray11, startArray12, startArray13, startArray14, startArray15, startArray2, startArray3, startArray4, startArray5, startArray6, startArray7, startArray8, startArray9, write, writeAny, writeArrayNull, writeArrayNull, writeAs, writeBigInt, writeBinary, writeBool, writeBooleanNull, writeDecimal, writeDecimal, writeDecimalNull, writeDecimalNull, writeDouble, writeDouble, writeDoubleArray, writeEnum, writeFloat, writeFloat, writeFloat, writeInstant, writeInt16, writeInt32, writeInt32, writeInt64Null, writeInt64Null, writeLocalDateWithFormat, writeMillis, writeName, writeName, writeName, writeNameAny, writeNameRaw, writeNameValue, writeNumberNull, writeNumberNull, writeObjectNull, writeRaw, writeRaw, writeReference, writeReference, writeString, writeString, writeString, writeString, writeString, writeString, writeString, writeString, writeString, writeString, writeStringNull, writeSymbol, writeSymbol, writeTypeName, writeTypeNamestatic final long REF
static final short QUOTE2_COLON
static final short QUOTE_COLON
final JSONFactory.CacheItem cacheItem
byte[] bytes
private final long byteVectorQuote
JSONWriterUTF8(JSONWriter.Context ctx)
public final void writeNull()
JSONWriterwriteNull in class JSONWriterpublic final void writeReference(java.lang.String path)
JSONWriterwriteReference in class JSONWriterpath - the JSON Pointer path to the referenced objectpublic final void writeBase64(byte[] value)
JSONWriterwriteBase64 in class JSONWritervalue - the byte array to encode and writepublic final void writeHex(byte[] values)
JSONWriterwriteHex in class JSONWritervalues - the byte array to encode and writepublic final void close()
JSONWriterclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class JSONWriterpublic final int size()
JSONWritersize in class JSONWriterpublic final byte[] getBytes()
JSONWritergetBytes in class JSONWriterpublic final byte[] getBytes(java.nio.charset.Charset charset)
JSONWritergetBytes in class JSONWritercharset - the charset to use for encodingpublic final int flushTo(java.io.OutputStream to)
throws java.io.IOException
JSONWriterflushTo in class JSONWriterto - the OutputStream to flush content tojava.io.IOException - if an I/O error occurs while writing to the OutputStreamprotected final void write0(char c)
JSONWriterwrite0 in class JSONWriterc - the character to writepublic final void writeColon()
JSONWriterwriteColon in class JSONWriterpublic final void startObject()
JSONWriterstartObject in class JSONWriterpublic final void endObject()
JSONWriterendObject in class JSONWriterpublic final void writeComma()
JSONWriterwriteComma in class JSONWriterpublic final void startArray()
JSONWriterstartArray in class JSONWriterpublic final void endArray()
JSONWriterendArray in class JSONWriterpublic final void writeString(java.lang.String[] strings)
JSONWriterwriteString in class JSONWriterstrings - the array of strings to write, can be nullpublic final void writeString(java.util.List<java.lang.String> list)
JSONWriterwriteString in class JSONWriterlist - the list of strings to write, can be nullpublic final void writeString(boolean value)
JSONWriterwriteString in class JSONWritervalue - the boolean value to writepublic final void writeString(byte value)
JSONWriterwriteString in class JSONWritervalue - the byte value to writepublic final void writeString(short value)
JSONWriterwriteString in class JSONWritervalue - the short value to writepublic final void writeString(int value)
JSONWriterwriteString in class JSONWritervalue - the int value to writepublic final void writeString(long value)
JSONWriterwriteString in class JSONWritervalue - the long value to writeprivate void writeQuote()
public void writeString(java.lang.String str)
JSONWriterwriteString in class JSONWriterstr - the string to write, can be nullprivate void writeStringJDK8(java.lang.String str)
public final void writeStringLatin1(byte[] value)
JSONWriterwriteStringLatin1 in class JSONWritervalue - the Latin-1 encoded bytes to writeprotected final void writeStringLatin1BrowserSecure(byte[] value)
public final void writeStringUTF16(byte[] value)
JSONWriterwriteStringUTF16 in class JSONWritervalue - the UTF-16 encoded bytes to writepublic final void writeString(char[] chars)
JSONWriterwriteString in class JSONWriterchars - the character array to writepublic final void writeString(char[] chars,
int stroff,
int strlen)
JSONWriterwriteString in class JSONWriterchars - the character array to writestroff - the offset in the arraystrlen - the number of characters to writeprotected final void writeStringEscaped(byte[] values)
protected final void writeStringEscapedRest(char[] chars,
int end,
boolean browserSecure,
boolean escapeNoneAscii,
int i)
public final void writeString(char[] chars,
int offset,
int len,
boolean quoted)
JSONWriterwriteString in class JSONWriterchars - the character array to writeoffset - the offset in the arraylen - the number of characters to writequoted - whether to quote the stringpublic final void writeChar(char ch)
JSONWriterwriteChar in class JSONWriterch - the character to writepublic final void writeUUID(java.util.UUID value)
JSONWriterwriteUUID in class JSONWritervalue - the UUID to write, can be nullprivate static long hex8(long i)
private static long expand(long i)
public final void writeRaw(java.lang.String str)
JSONWriterwriteRaw in class JSONWriterstr - the string to writepublic final void writeRaw(byte[] raw)
JSONWriterwriteRaw in class JSONWriterraw - the bytes to writepublic final void writeNameRaw(byte[] name)
JSONWriterwriteNameRaw in class JSONWritername - the bytes to writepublic final void writeName2Raw(long name)
JSONWriterwriteName2Raw in class JSONWritername - the 2-character field name as a long valueprivate int indent(byte[] bytes,
int off)
public final void writeName3Raw(long name)
JSONWriterwriteName3Raw in class JSONWritername - the 3-character field name as a long valuepublic final void writeName4Raw(long name)
JSONWriterwriteName4Raw in class JSONWritername - the 4-character field name as a long valuepublic final void writeName5Raw(long name)
JSONWriterwriteName5Raw in class JSONWritername - the 5-character field name as a long valuepublic final void writeName6Raw(long name)
JSONWriterwriteName6Raw in class JSONWritername - the 6-character field name as a long valuepublic final void writeName7Raw(long name)
JSONWriterwriteName7Raw in class JSONWritername - the 7-character field name as a long valuepublic void writeName8Raw(long name)
JSONWriterwriteName8Raw in class JSONWritername - the 8-character field name as a long valuepublic final void writeName9Raw(long name0,
int name1)
JSONWriterwriteName9Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the 9th character of the field name as an integer valuepublic final void writeName10Raw(long name0,
long name1)
JSONWriterwriteName10Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 2 characters of the field name as a long valuepublic final void writeName11Raw(long name0,
long name1)
JSONWriterwriteName11Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 3 characters of the field name as a long valuepublic final void writeName12Raw(long name0,
long name1)
JSONWriterwriteName12Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 4 characters of the field name as a long valuepublic final void writeName13Raw(long name0,
long name1)
JSONWriterwriteName13Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 5 characters of the field name as a long valuepublic final void writeName14Raw(long name0,
long name1)
JSONWriterwriteName14Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 6 characters of the field name as a long valuepublic final void writeName15Raw(long name0,
long name1)
JSONWriterwriteName15Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 7 characters of the field name as a long valuepublic final void writeName16Raw(long name0,
long name1)
JSONWriterwriteName16Raw in class JSONWritername0 - the first 8 characters of the field name as a long valuename1 - the last 8 characters of the field name as a long valuepublic final void writeRaw(byte b)
JSONWriterwriteRaw in class JSONWriterb - the byte to writepublic final void writeRaw(char ch)
JSONWriterwriteRaw in class JSONWriterch - the character to writepublic final void writeRaw(char c0,
char c1)
JSONWriterwriteRaw in class JSONWriterc0 - the first character to writec1 - the second character to writepublic final void writeNameRaw(byte[] name,
int coff,
int len)
JSONWriterwriteNameRaw in class JSONWritername - the bytes to writecoff - the offset in the byte arraylen - the number of bytes to writepublic final java.lang.Object ensureCapacity(int minCapacity)
JSONWriterensureCapacity in class JSONWriterminCapacity - the minimum capacity requiredprivate byte[] grow(int minCapacity)
private byte[] grow1(int off)
private void grow0(int minCapacity)
public final void writeInt32(int[] values)
JSONWriterwriteInt32 in class JSONWritervalues - the int array to writepublic final void writeInt8(byte i)
JSONWriterwriteInt8 in class JSONWriteri - the byte value to writepublic final void writeInt8(byte[] values)
JSONWriterwriteInt8 in class JSONWritervalues - the byte array to writepublic final void writeInt16(short i)
JSONWriterwriteInt16 in class JSONWriteri - the short value to writepublic final void writeInt32(java.lang.Integer i)
JSONWriterwriteInt32 in class JSONWriteri - the Integer object to writepublic final void writeInt32(int i)
JSONWriterwriteInt32 in class JSONWriteri - the int value to writepublic final void writeListInt32(java.util.List<java.lang.Integer> values)
JSONWriterwriteListInt32 in class JSONWritervalues - the list of Integer values to writepublic final void writeInt64(long[] values)
JSONWriterwriteInt64 in class JSONWritervalues - the long array to writepublic final void writeListInt64(java.util.List<java.lang.Long> values)
JSONWriterwriteListInt64 in class JSONWritervalues - the list of Long values to writepublic final void writeInt64(long i)
JSONWriterwriteInt64 in class JSONWriteri - the long value to writepublic final void writeInt64(java.lang.Long i)
JSONWriterwriteInt64 in class JSONWriteri - the Long object to writepublic final void writeFloat(float value)
JSONWriterwriteFloat in class JSONWritervalue - the float value to writepublic final void writeDouble(double value)
JSONWriterwriteDouble in class JSONWritervalue - the double value to writepublic final void writeFloat(float[] values)
writeFloat in class JSONWriterpublic final void writeDouble(double[] values)
JSONWriterwriteDouble in class JSONWritervalues - the double array to writepublic final void writeDateTime14(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second)
JSONWriterwriteDateTime14 in class JSONWriteryear - the yearmonth - the month (1-12)dayOfMonth - the day of month (1-31)hour - the hour (0-23)minute - the minute (0-59)second - the second (0-59)public final void writeDateTime19(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second)
JSONWriterwriteDateTime19 in class JSONWriteryear - the yearmonth - the month (1-12)dayOfMonth - the day of month (1-31)hour - the hour (0-23)minute - the minute (0-59)second - the second (0-59)public final void writeLocalDate(java.time.LocalDate date)
JSONWriterwriteLocalDate in class JSONWriterdate - the LocalDate to writepublic final void writeLocalDateTime(java.time.LocalDateTime dateTime)
JSONWriterwriteLocalDateTime in class JSONWriterdateTime - the LocalDateTime to writepublic final void writeDateYYYMMDD8(int year,
int month,
int dayOfMonth)
JSONWriterwriteDateYYYMMDD8 in class JSONWriteryear - the yearmonth - the month (1-12)dayOfMonth - the day of month (1-31)public final void writeDateYYYMMDD10(int year,
int month,
int dayOfMonth)
JSONWriterwriteDateYYYMMDD10 in class JSONWriteryear - the yearmonth - the month (1-12)dayOfMonth - the day of month (1-31)public final void writeTimeHHMMSS8(int hour,
int minute,
int second)
JSONWriterwriteTimeHHMMSS8 in class JSONWriterhour - the hour (0-23)minute - the minute (0-59)second - the second (0-59)public final void writeLocalTime(java.time.LocalTime time)
JSONWriterwriteLocalTime in class JSONWritertime - the LocalTime to writepublic final void writeZonedDateTime(java.time.ZonedDateTime dateTime)
JSONWriterwriteZonedDateTime in class JSONWriterdateTime - the ZonedDateTime to writepublic final void writeOffsetDateTime(java.time.OffsetDateTime dateTime)
JSONWriterwriteOffsetDateTime in class JSONWriterdateTime - the OffsetDateTime to writepublic final void writeOffsetTime(java.time.OffsetTime time)
JSONWriterwriteOffsetTime in class JSONWritertime - the OffsetTime to writepublic final void writeBigInt(java.math.BigInteger value,
long features)
JSONWriterwriteBigInt in class JSONWritervalue - the BigInteger value to write, can be nullfeatures - the features to use for serializationpublic final void writeDateTimeISO8601(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second,
int millis,
int offsetSeconds,
boolean timeZone)
JSONWriterwriteDateTimeISO8601 in class JSONWriteryear - the yearmonth - the month (1-12)dayOfMonth - the day of month (1-31)hour - the hour (0-23)minute - the minute (0-59)second - the second (0-59)millis - the millisecond (0-999)offsetSeconds - the timezone offset in secondstimeZone - whether to include timezone informationpublic final void writeDecimal(java.math.BigDecimal value,
long features,
java.text.DecimalFormat format)
JSONWriterwriteDecimal in class JSONWritervalue - the BigDecimal value to write, can be nullfeatures - the features to use for serializationformat - the decimal format to use, or null to use default formattingpublic final void writeNameRaw(char[] chars)
JSONWriterwriteNameRaw in class JSONWriterchars - the character array to writepublic final void writeNameRaw(char[] bytes,
int offset,
int len)
JSONWriterwriteNameRaw in class JSONWriterbytes - the character array to writeoffset - the offset in the character arraylen - the number of characters to writepublic final void write(java.util.Map<?,?> map)
JSONWriterwrite in class JSONWritermap - the Map to write, can be nullpublic final void write(java.util.List array)
JSONWriterwrite in class JSONWriterarray - the list to writepublic void writeBool(boolean value)
JSONWriterwriteBool in class JSONWritervalue - the boolean value to writepublic final java.lang.String toString()
toString in class java.lang.Objectpublic final int flushTo(java.io.OutputStream out,
java.nio.charset.Charset charset)
throws java.io.IOException
JSONWriterflushTo in class JSONWriterout - the OutputStream to flush content tocharset - the charset to use for encodingjava.io.IOException - if an I/O error occurs while writing to the OutputStream