public class Decoder
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
(package private) JSONCodec |
codec |
(package private) int |
current |
(package private) java.security.MessageDigest |
digest |
(package private) java.lang.String |
encoding |
(package private) java.util.Map<java.lang.String,java.lang.Object> |
extra |
(package private) boolean |
inflate |
(package private) boolean |
keepOpen |
(package private) java.io.Reader |
reader |
(package private) boolean |
strict |
| Modifier and Type | Method and Description |
|---|---|
Decoder |
charset(java.lang.String encoding) |
void |
close() |
(package private) int |
current() |
byte[] |
digest() |
(package private) void |
expect(java.lang.String s) |
Decoder |
faq(java.lang.String in) |
Decoder |
from(byte[] data) |
Decoder |
from(java.io.File file) |
Decoder |
from(java.io.InputStream in) |
Decoder |
from(java.io.Reader in) |
Decoder |
from(java.lang.String in) |
java.lang.Object |
get() |
<T> T |
get(java.lang.Class<T> clazz) |
java.lang.Object |
get(java.lang.reflect.Type type) |
<T> T |
get(TypeReference<T> ref) |
java.util.Map<java.lang.String,java.lang.Object> |
getExtra() |
Decoder |
inflate() |
boolean |
isEof() |
Decoder |
keepOpen() |
Decoder |
mark() |
(package private) int |
next()
Skip any whitespace.
|
(package private) int |
read() |
(package private) int |
skipWs()
Skip any whitespace.
|
Decoder |
strict() |
final JSONCodec codec
java.io.Reader reader
int current
java.security.MessageDigest digest
java.util.Map<java.lang.String,java.lang.Object> extra
java.lang.String encoding
boolean strict
boolean inflate
boolean keepOpen
Decoder(JSONCodec codec)
public Decoder from(java.io.File file) throws java.lang.Exception
java.lang.Exceptionpublic Decoder from(java.io.InputStream in) throws java.lang.Exception
java.lang.Exceptionpublic Decoder from(byte[] data) throws java.lang.Exception
java.lang.Exceptionpublic Decoder charset(java.lang.String encoding)
public Decoder strict()
public Decoder from(java.io.Reader in) throws java.lang.Exception
java.lang.Exceptionpublic Decoder faq(java.lang.String in) throws java.lang.Exception
java.lang.Exceptionpublic Decoder from(java.lang.String in) throws java.lang.Exception
java.lang.Exceptionpublic Decoder mark() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic byte[] digest()
public <T> T get(java.lang.Class<T> clazz)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object get(java.lang.reflect.Type type)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object get()
throws java.lang.Exception
java.lang.Exceptionpublic <T> T get(TypeReference<T> ref) throws java.lang.Exception
java.lang.Exceptionpublic Decoder keepOpen()
int read() throws java.lang.Exception
java.lang.Exceptionint current()
int skipWs()
throws java.lang.Exception
java.lang.Exceptionint next() throws java.lang.Exception
java.lang.Exceptionvoid expect(java.lang.String s)
throws java.lang.Exception
java.lang.Exceptionpublic boolean isEof()
throws java.lang.Exception
java.lang.Exceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getExtra()
public Decoder inflate()