public class ValueInput extends Object implements StreamingInput
| Constructor and Description |
|---|
ValueInput(String key,
Object value) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Token |
current()
Get the current token.
|
boolean |
getBoolean()
Get the value as a boolean.
|
byte[] |
getByteArray()
Get the value as a byte[] array.
|
double |
getDouble()
Get the value as a double.
|
float |
getFloat()
Get the value as a float.
|
int |
getInt()
Get the value as an integer.
|
long |
getLong()
Get the value as a long.
|
short |
getShort()
Get the value as a short.
|
String |
getString()
Get the current value as a string.
|
Object |
getValue()
Get the current value.
|
Token |
next()
Advance to the next token.
|
Token |
next(Token expected)
Advance to the next token checking that it is of a certain type.
|
Token |
peek()
Peek into the stream and return the next token.
|
void |
skip()
Skip the started object or list.
|
void |
skipValue()
If this token is a
Token.KEY this will skip its value. |
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Token peek() throws IOException
StreamingInputpeek in interface StreamingInputIOExceptionpublic Token next() throws IOException
StreamingInputnext in interface StreamingInputIOExceptionpublic Token next(Token expected) throws IOException
StreamingInputnext in interface StreamingInputIOExceptionpublic void skip()
throws IOException
StreamingInputToken.OBJECT_START or Token.LIST_START.skip in interface StreamingInputIOExceptionpublic void skipValue()
throws IOException
StreamingInputToken.KEY this will skip its value.skipValue in interface StreamingInputIOExceptionpublic Token current()
StreamingInputcurrent in interface StreamingInputpublic Object getValue()
StreamingInputgetValue in interface StreamingInputpublic String getString()
StreamingInputgetString in interface StreamingInputpublic boolean getBoolean()
StreamingInputgetBoolean in interface StreamingInputpublic double getDouble()
StreamingInputgetDouble in interface StreamingInputpublic float getFloat()
StreamingInputgetFloat in interface StreamingInputpublic long getLong()
StreamingInputgetLong in interface StreamingInputpublic int getInt()
StreamingInputgetInt in interface StreamingInputpublic short getShort()
StreamingInputgetShort in interface StreamingInputpublic byte[] getByteArray()
StreamingInputgetByteArray in interface StreamingInputCopyright © 2016. All rights reserved.