public final class SerializeWriter extends Writer
| Modifier and Type | Field and Description |
|---|---|
static char[] |
DIGITS |
| Constructor and Description |
|---|
SerializeWriter() |
SerializeWriter(int initialSize) |
SerializeWriter(SerializerFeature... features) |
SerializeWriter(Writer writer) |
SerializeWriter(Writer writer,
int initialSize) |
SerializeWriter(Writer writer,
int featuresValue,
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 |
flush() |
boolean |
isEnabled(SerializerFeature feature) |
byte[] |
toBytes(String charsetName) |
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(String text) |
void |
write(String str,
int off,
int len)
Write a portion of a string to the buffer.
|
void |
writeByteArray(byte[] bytes) |
void |
writeFieldName(String key,
boolean checkSpecial) |
void |
writeInt(int i) |
void |
writeLong(long i) |
void |
writeNull() |
void |
writeString(String text) |
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.
|
public SerializeWriter()
public SerializeWriter(Writer writer)
public SerializeWriter(SerializerFeature... features)
public SerializeWriter(Writer writer, int featuresValue, SerializerFeature[] features)
public SerializeWriter(int initialSize)
public SerializeWriter(Writer writer, int initialSize)
public void config(SerializerFeature feature, boolean state)
public boolean isEnabled(SerializerFeature feature)
public void write(char[] c,
int off,
int len)
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
IOExceptionpublic void writeTo(OutputStream out, Charset charset) throws IOException
IOExceptionpublic SerializeWriter append(CharSequence csq)
append in interface Appendableappend in class Writerpublic SerializeWriter append(CharSequence csq, int start, int end)
append in interface Appendableappend in class Writerpublic SerializeWriter append(char c)
append in interface Appendableappend in class Writerpublic byte[] toBytes(String charsetName)
public void close()
public void writeInt(int i)
public void writeByteArray(byte[] bytes)
public void writeLong(long i)
public void writeNull()
public void write(boolean value)
public void writeString(String text)
public void writeFieldName(String key, boolean checkSpecial)
Copyright © 2012–2018 Alibaba Group. All rights reserved.