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.Exceptionpublic Encoder mark() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic byte[] digest()
throws java.security.NoSuchAlgorithmException,
java.io.IOException
java.security.NoSuchAlgorithmExceptionjava.io.IOExceptionpublic Encoder to() throws java.io.IOException
java.io.IOExceptionpublic Encoder to(java.io.File file) throws java.io.IOException
java.io.IOExceptionpublic 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.IOExceptionpublic Encoder to(java.lang.Appendable out) throws java.io.IOException
java.io.IOExceptionpublic java.lang.Appendable append(char c)
throws java.io.IOException
append in interface java.lang.Appendablejava.io.IOExceptionpublic java.lang.Appendable append(java.lang.CharSequence sq)
throws java.io.IOException
append in interface java.lang.Appendablejava.io.IOExceptionpublic java.lang.Appendable append(java.lang.CharSequence sq,
int start,
int length)
throws java.io.IOException
append in interface java.lang.Appendablejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionvoid 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.Exceptionpublic Encoder writeDefaults()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushablejava.io.IOExceptionpublic Encoder deflate()
public Encoder indent(java.lang.String tabs)
void undent()
throws java.io.IOException
java.io.IOExceptionvoid indent()
throws java.io.IOException
java.io.IOExceptionpublic Encoder keepOpen()