public class Encoder
extends java.lang.Object
implements java.lang.Appendable, java.io.Closeable, java.io.Flushable
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Appendable |
app |
(package private) boolean |
closed |
(package private) JSONCodec |
codec |
(package private) boolean |
deflate |
(package private) java.security.MessageDigest |
digest |
(package private) java.nio.charset.Charset |
encoding |
(package private) java.lang.String |
indent |
(package private) boolean |
keepOpen |
(package private) java.lang.String |
tabs |
(package private) boolean |
writeDefaults |
Modifier and Type | Method and Description |
---|---|
java.lang.Appendable |
append(char c) |
java.lang.Appendable |
append(java.lang.CharSequence sq) |
java.lang.Appendable |
append(java.lang.CharSequence sq,
int start,
int length) |
Encoder |
charset(java.nio.charset.Charset encoding) |
Encoder |
charset(java.lang.String encoding) |
void |
close() |
Encoder |
deflate() |
byte[] |
digest() |
(package private) void |
encode(java.lang.Object object,
java.lang.reflect.Type type,
java.util.Map<java.lang.Object,java.lang.reflect.Type> visited) |
void |
flush() |
(package private) void |
indent() |
Encoder |
indent(java.lang.String tabs) |
Encoder |
keepOpen() |
Encoder |
mark() |
Encoder |
put(java.lang.Object object) |
Encoder |
to() |
Encoder |
to(java.lang.Appendable out) |
Encoder |
to(java.io.File file) |
Encoder |
to(java.io.OutputStream out) |
java.lang.String |
toString() |
(package private) void |
undent() |
Encoder |
writeDefaults() |
final JSONCodec codec
java.lang.Appendable app
java.security.MessageDigest digest
boolean writeDefaults
java.nio.charset.Charset encoding
boolean deflate
java.lang.String tabs
java.lang.String indent
boolean keepOpen
boolean closed
Encoder(JSONCodec codec)
public Encoder put(java.lang.Object object) throws java.lang.Exception
java.lang.Exception
public Encoder mark() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public byte[] digest() throws java.security.NoSuchAlgorithmException, java.io.IOException
java.security.NoSuchAlgorithmException
java.io.IOException
public Encoder to() throws java.io.IOException
java.io.IOException
public Encoder to(java.io.File file) throws java.io.IOException
java.io.IOException
public Encoder charset(java.lang.String encoding)
public Encoder charset(java.nio.charset.Charset encoding)
public Encoder to(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public Encoder to(java.lang.Appendable out) throws java.io.IOException
java.io.IOException
public java.lang.Appendable append(char c) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence sq) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence sq, int start, int length) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
void encode(java.lang.Object object, java.lang.reflect.Type type, java.util.Map<java.lang.Object,java.lang.reflect.Type> visited) throws java.lang.Exception
java.lang.Exception
public Encoder writeDefaults()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
java.io.IOException
public Encoder deflate()
public Encoder indent(java.lang.String tabs)
void undent() throws java.io.IOException
java.io.IOException
void indent() throws java.io.IOException
java.io.IOException
public Encoder keepOpen()