public final class SerializeWriter extends Writer
Constructor and Description |
---|
SerializeWriter() |
SerializeWriter(int initialSize) |
SerializeWriter(SerializerFeature... features) |
SerializeWriter(Writer writer) |
SerializeWriter(Writer writer,
int initialSize) |
SerializeWriter(Writer writer,
int defaultFeatures,
SerializerFeature... features) |
SerializeWriter(Writer writer,
SerializerFeature... features) |
Modifier and Type | Method and Description |
---|---|
SerializeWriter |
append(char c) |
SerializeWriter |
append(CharSequence csq) |
SerializeWriter |
append(CharSequence csq,
int start,
int end) |
void |
close()
Close the stream.
|
void |
config(SerializerFeature feature,
boolean state) |
void |
expandCapacity(int minimumCapacity) |
void |
flush() |
int |
getBufferLength() |
int |
getMaxBufSize() |
boolean |
isEnabled(int feature) |
boolean |
isEnabled(SerializerFeature feature) |
boolean |
isNotWriteDefaultValue() |
boolean |
isSortField() |
void |
reset()
Deprecated.
|
void |
setMaxBufSize(int maxBufSize) |
int |
size() |
byte[] |
toBytes(Charset charset) |
byte[] |
toBytes(String charsetName) |
char[] |
toCharArray()
Returns a copy of the input data.
|
char[] |
toCharArrayForSpringWebSocket()
only for springwebsocket
|
String |
toString() |
void |
write(boolean value) |
void |
write(char[] c,
int off,
int len)
Writes characters to the buffer.
|
void |
write(int c)
Writes a character to the buffer.
|
void |
write(List<String> list) |
void |
write(String text) |
void |
write(String str,
int off,
int len)
Write a portion of a string to the buffer.
|
void |
writeByteArray(byte[] bytes) |
void |
writeDouble(double value,
boolean checkWriteClassName) |
void |
writeEnum(Enum<?> value) |
void |
writeFieldName(String key) |
void |
writeFieldName(String key,
boolean checkSpecial) |
void |
writeFieldNameDirect(String text) |
void |
writeFieldValue(char seperator,
String name,
BigDecimal value) |
void |
writeFieldValue(char seperator,
String name,
boolean value) |
void |
writeFieldValue(char seperator,
String name,
char value) |
void |
writeFieldValue(char seperator,
String name,
double value) |
void |
writeFieldValue(char seperator,
String name,
Enum<?> value) |
void |
writeFieldValue(char seperator,
String name,
float value) |
void |
writeFieldValue(char seperator,
String name,
int value) |
void |
writeFieldValue(char seperator,
String name,
long value) |
void |
writeFieldValue(char seperator,
String name,
String value) |
void |
writeFieldValueStringWithDoubleQuote(char seperator,
String name,
String value) |
void |
writeFieldValueStringWithDoubleQuoteCheck(char seperator,
String name,
String value) |
void |
writeFloat(float value,
boolean checkWriteClassName) |
void |
writeHex(byte[] bytes) |
void |
writeInt(int i) |
void |
writeLong(long i) |
void |
writeLongAndChar(long i,
char c)
Deprecated.
|
void |
writeNull() |
void |
writeNull(int beanFeatures,
int feature) |
void |
writeNull(SerializerFeature feature) |
void |
writeString(char[] chars) |
void |
writeString(String text) |
void |
writeString(String text,
char seperator) |
void |
writeStringWithDoubleQuote(char[] text,
char seperator) |
void |
writeStringWithDoubleQuote(String text,
char seperator) |
void |
writeTo(OutputStream out,
Charset charset) |
void |
writeTo(OutputStream out,
String charsetName) |
void |
writeTo(Writer out)
Writes the contents of the buffer to another character stream.
|
int |
writeToEx(OutputStream out,
Charset charset) |
public SerializeWriter()
public SerializeWriter(Writer writer)
public SerializeWriter(SerializerFeature... features)
public SerializeWriter(Writer writer, SerializerFeature... features)
public SerializeWriter(Writer writer, int defaultFeatures, SerializerFeature... features)
writer
- defaultFeatures
- features
- public SerializeWriter(int initialSize)
public SerializeWriter(Writer writer, int initialSize)
public int getMaxBufSize()
public void setMaxBufSize(int maxBufSize)
public int getBufferLength()
public void config(SerializerFeature feature, boolean state)
public boolean isSortField()
public boolean isNotWriteDefaultValue()
public boolean isEnabled(SerializerFeature feature)
public boolean isEnabled(int feature)
public void write(char[] c, int off, int len)
public void expandCapacity(int minimumCapacity)
public SerializeWriter append(CharSequence csq)
append
in interface Appendable
append
in class Writer
public SerializeWriter append(CharSequence csq, int start, int end)
append
in interface Appendable
append
in class Writer
public SerializeWriter append(char c)
append
in interface Appendable
append
in class Writer
public void write(String str, int off, int len)
public void writeTo(Writer out) throws IOException
out
- the output stream to write toIOException
- If an I/O error occurs.public void writeTo(OutputStream out, String charsetName) throws IOException
IOException
public void writeTo(OutputStream out, Charset charset) throws IOException
IOException
public int writeToEx(OutputStream out, Charset charset) throws IOException
IOException
public char[] toCharArray()
public char[] toCharArrayForSpringWebSocket()
public byte[] toBytes(String charsetName)
public byte[] toBytes(Charset charset)
public int size()
public void close()
public void writeInt(int i)
public void writeByteArray(byte[] bytes)
public void writeHex(byte[] bytes)
public void writeFloat(float value, boolean checkWriteClassName)
public void writeDouble(double value, boolean checkWriteClassName)
public void writeEnum(Enum<?> value)
public void writeLongAndChar(long i, char c) throws IOException
IOException
public void writeLong(long i)
public void writeNull()
public void writeNull(SerializerFeature feature)
public void writeNull(int beanFeatures, int feature)
public void writeStringWithDoubleQuote(String text, char seperator)
public void writeStringWithDoubleQuote(char[] text, char seperator)
public void writeFieldNameDirect(String text)
public void writeFieldValue(char seperator, String name, char value)
public void writeFieldValue(char seperator, String name, boolean value)
public void write(boolean value)
public void writeFieldValue(char seperator, String name, int value)
public void writeFieldValue(char seperator, String name, long value)
public void writeFieldValue(char seperator, String name, float value)
public void writeFieldValue(char seperator, String name, double value)
public void writeFieldValueStringWithDoubleQuoteCheck(char seperator, String name, String value)
public void writeFieldValueStringWithDoubleQuote(char seperator, String name, String value)
public void writeFieldValue(char seperator, String name, BigDecimal value)
public void writeString(String text, char seperator)
public void writeString(String text)
public void writeString(char[] chars)
public void writeFieldName(String key)
public void writeFieldName(String key, boolean checkSpecial)
public void flush()
public void reset()
Copyright © 2012–2022 Alibaba Group. All rights reserved.