class JSONWriterUTF16 extends JSONWriter
JSONWriter.Context, JSONWriter.Feature, JSONWriter.Path| Modifier and Type | Field and Description |
|---|---|
(package private) static long |
BYTE_VEC_64_DOUBLE_QUOTE |
(package private) static long |
BYTE_VEC_64_SINGLE_QUOTE |
protected long |
byteVectorQuote |
(package private) JSONFactory.CacheItem |
cacheItem |
protected char[] |
chars |
(package private) static int[] |
HEX256 |
(package private) static int |
QUOTE_COLON |
(package private) static int |
QUOTE2_COLON |
(package private) static long |
REF_0 |
(package private) static long |
REF_1 |
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 |
|---|
JSONWriterUTF16(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.
|
(package private) void |
ensureCapacityInternal(int minCapacity) |
(package private) static long |
expand(long i) |
int |
flushTo(java.io.OutputStream out)
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.
|
void |
flushTo(java.io.Writer to)
Flushes the content of this JSONWriter to the specified Writer.
|
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 char[] |
grow(int minCapacity) |
protected void |
grow0(int minCapacity) |
private int |
indent(char[] chars,
int off) |
(package private) static void |
putLong(char[] buf,
int off,
int b0,
int b1) |
private static void |
putLong(char[] chars,
int off,
long name) |
private static void |
putLong(char[] chars,
int off,
long name,
int name1) |
private static void |
putLong(char[] chars,
int off,
long name,
long name1) |
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[] bytes)
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 |
writeDoubleArray(double value0,
double value1)
Writes a double array with two elements.
|
void |
writeFloat(float value)
Writes a float value.
|
void |
writeFloat(float[] values) |
void |
writeHex(byte[] bytes)
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[] value)
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[] value)
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[] bytes)
Writes raw bytes representing a field name without any escaping or formatting.
|
void |
writeNameRaw(char[] name)
Writes raw characters representing a field name without any escaping or formatting.
|
void |
writeNameRaw(char[] name,
int coff,
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[] bytes)
Writes raw bytes without any escaping or formatting.
|
void |
writeRaw(char ch)
Writes a raw character without any escaping or formatting.
|
void |
writeRaw(char[] str,
int coff,
int strlen)
Writes raw characters 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[] value)
Writes a string from character array.
|
void |
writeString(char[] str,
int coff,
int len)
Writes a string from character array with specified offset and length.
|
void |
writeString(char[] str,
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.
|
(package private) void |
writeStringBrowserSecure(char[] value) |
protected void |
writeStringEscape(byte[] str) |
protected void |
writeStringEscape(char[] str) |
protected void |
writeStringEscape(java.lang.String str) |
protected void |
writeStringEscapeUTF16(byte[] 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.
|
(package private) void |
writeStringUTF16BrowserSecure(byte[] value) |
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, 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, writeEnum, writeFloat, writeFloat, writeFloat, writeInstant, writeInt16, writeInt32, writeInt32, writeInt64Null, writeInt64Null, writeLocalDateWithFormat, writeMillis, writeName, writeName, writeName, writeNameAny, writeNameRaw, 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 BYTE_VEC_64_SINGLE_QUOTE
static final long BYTE_VEC_64_DOUBLE_QUOTE
static final long REF_0
static final long REF_1
static final int QUOTE2_COLON
static final int QUOTE_COLON
static final int[] HEX256
protected char[] chars
final JSONFactory.CacheItem cacheItem
protected final long byteVectorQuote
JSONWriterUTF16(JSONWriter.Context ctx)
public final void writeNull()
JSONWriterwriteNull in class JSONWriterpublic final void flushTo(java.io.Writer to)
JSONWriterflushTo in class JSONWriterto - the Writer to flush content topublic final void close()
JSONWriterclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class JSONWriterprotected 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.util.List<java.lang.String> list)
JSONWriterwriteString in class JSONWriterlist - the list of strings to write, can be nullpublic void writeStringLatin1(byte[] value)
JSONWriterwriteStringLatin1 in class JSONWritervalue - the Latin-1 encoded bytes to writestatic long expand(long i)
protected final void writeStringLatin1BrowserSecure(byte[] value)
public void writeStringUTF16(byte[] value)
JSONWriterwriteStringUTF16 in class JSONWritervalue - the UTF-16 encoded bytes to writefinal void writeStringBrowserSecure(char[] value)
final void writeStringUTF16BrowserSecure(byte[] value)
public void writeString(java.lang.String str)
JSONWriterwriteString in class JSONWriterstr - the string to write, can be nullprotected final void writeStringEscape(java.lang.String str)
protected final void writeStringEscapeUTF16(byte[] str)
protected final void writeStringEscape(char[] str)
protected final void writeStringEscape(byte[] str)
public final void writeString(char[] str,
int offset,
int len,
boolean quoted)
JSONWriterwriteString in class JSONWriterstr - the character array to writeoffset - the offset in the arraylen - the number of characters to writequoted - whether to quote the stringpublic final void writeString(java.lang.String[] strings)
JSONWriterwriteString in class JSONWriterstrings - the array of strings to write, can be nullpublic final void writeReference(java.lang.String path)
JSONWriterwriteReference in class JSONWriterpath - the JSON Pointer path to the referenced objectpublic final void writeBase64(byte[] bytes)
JSONWriterwriteBase64 in class JSONWriterbytes - the byte array to encode and writepublic final void writeHex(byte[] bytes)
JSONWriterwriteHex in class JSONWriterbytes - the byte array to encode and 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 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 formattingstatic void putLong(char[] buf,
int off,
int b0,
int b1)
public final void writeUUID(java.util.UUID value)
JSONWriterwriteUUID in class JSONWritervalue - the UUID to write, can be nullpublic final void writeRaw(java.lang.String str)
JSONWriterwriteRaw in class JSONWriterstr - the string to writepublic final void writeRaw(char[] str,
int coff,
int strlen)
JSONWriterwriteRaw in class JSONWriterstr - the character array to writecoff - the offset in the character arraystrlen - the number of characters to writepublic final void writeChar(char ch)
JSONWriterwriteChar in class JSONWriterch - the character 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(char[] name)
JSONWriterwriteNameRaw in class JSONWritername - the character array to writepublic final void writeName2Raw(long name)
JSONWriterwriteName2Raw in class JSONWritername - the 2-character field name as a long valuepublic 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 final 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 valueprivate static void putLong(char[] chars,
int off,
long name)
private static void putLong(char[] chars,
int off,
long name,
int name1)
private static void putLong(char[] chars,
int off,
long name,
long name1)
private int indent(char[] chars,
int off)
public final void writeNameRaw(char[] name,
int coff,
int len)
JSONWriterwriteNameRaw in class JSONWritername - the character array to writecoff - the offset in the character arraylen - the number of characters to writepublic final java.lang.Object ensureCapacity(int minCapacity)
JSONWriterensureCapacity in class JSONWriterminCapacity - the minimum capacity requiredfinal void ensureCapacityInternal(int minCapacity)
private char[] grow(int minCapacity)
protected final void grow0(int minCapacity)
public final void writeInt32(int[] value)
JSONWriterwriteInt32 in class JSONWritervalue - the int array to writepublic final void writeInt8(byte i)
JSONWriterwriteInt8 in class JSONWriteri - the byte value to writepublic final void writeInt8(byte[] value)
JSONWriterwriteInt8 in class JSONWritervalue - the byte array to writepublic final void writeInt16(short i)
JSONWriterwriteInt16 in class JSONWriteri - the short value to writepublic final void writeInt32(int i)
JSONWriterwriteInt32 in class JSONWriteri - the int value to writepublic final void writeInt32(java.lang.Integer i)
JSONWriterwriteInt32 in class JSONWriteri - the Integer object to writepublic final void writeInt64(long[] values)
JSONWriterwriteInt64 in class JSONWritervalues - the long array 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 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 writeFloat(float[] values)
writeFloat in class JSONWriterpublic final void writeDouble(double value)
JSONWriterwriteDouble in class JSONWritervalue - the double value to writepublic final void writeDoubleArray(double value0,
double value1)
JSONWriterwriteDoubleArray in class JSONWritervalue0 - the first double value to writevalue1 - the second double value to writepublic 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 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 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 writeNameRaw(byte[] bytes)
JSONWriterwriteNameRaw in class JSONWriterbytes - the bytes to writepublic final int flushTo(java.io.OutputStream out)
throws java.io.IOException
JSONWriterflushTo in class JSONWriterout - the OutputStream to flush content tojava.io.IOException - if an I/O error occurs while writing to the OutputStreampublic 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 OutputStreampublic final java.lang.String toString()
toString in class java.lang.Objectpublic final byte[] getBytes()
JSONWritergetBytes in class JSONWriterpublic final int size()
JSONWritersize in class JSONWriterpublic final byte[] getBytes(java.nio.charset.Charset charset)
JSONWritergetBytes in class JSONWritercharset - the charset to use for encodingpublic final void writeRaw(byte[] bytes)
JSONWriterwriteRaw in class JSONWriterbytes - the bytes 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 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 final void writeString(char[] value)
JSONWriterwriteString in class JSONWritervalue - the character array to writepublic final void writeString(char[] str,
int coff,
int len)
JSONWriterwriteString in class JSONWriterstr - the character array to writecoff - the offset in the arraylen - the number of characters to writepublic void writeBool(boolean value)
JSONWriterwriteBool in class JSONWritervalue - the boolean value to write