public class JsonStreamReader extends java.lang.Object implements IpcStreamReader
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader and the underlying stream.
|
void |
closeWithoutStream()
Closes the reader but NOT the underlying stream.
|
byte[] |
currentBinaryValue()
Returns the current token value as binary value.
|
boolean |
currentBoolValue()
Returns the current token value as boolean value.
|
double |
currentDoubleValue()
Returns the current token value as double value.
|
long |
currentLongValue()
Returns the current token value as long value.
|
java.lang.String |
currentStringValue()
Returns the current token value as string.
|
java.io.InputStream |
getStream()
Not supported by this implementation, so this always throws an
UnsupportedOperationException. |
byte[] |
nextBinaryValue()
Shortcut for nextToken() + currentBinaryValue().
|
boolean |
nextBoolValue()
Shortcut for nextToken() + currentBoolValue().
|
double |
nextDoubleValue()
Shortcut for nextToken() + currentDoubleValue().
|
long |
nextLongValue()
Shortcut for nextToken() + currentLongValue().
|
java.lang.String |
nextStringValue()
Shortcut for nextToken() + currentStringValue().
|
IpcToken |
nextToken()
Returns the next token.
|
<T> T |
readObject(java.lang.Class<T> type)
read object of desired class from JSON stream.
|
public void close()
throws java.io.IOException
close in interface IpcStreamReaderjava.io.IOException - any errorpublic void closeWithoutStream()
throws java.io.IOException
closeWithoutStream in interface IpcStreamReaderjava.io.IOException - any errorpublic boolean currentBoolValue()
throws java.io.IOException
currentBoolValue in interface IpcStreamReaderjava.io.IOException - any errorpublic double currentDoubleValue()
throws java.io.IOException
currentDoubleValue in interface IpcStreamReaderjava.io.IOException - any errorpublic long currentLongValue()
throws java.io.IOException
currentLongValue in interface IpcStreamReaderjava.io.IOException - any errorpublic java.lang.String currentStringValue()
throws java.io.IOException
currentStringValue in interface IpcStreamReaderjava.io.IOException - any errorpublic byte[] currentBinaryValue()
throws java.io.IOException
currentBinaryValue in interface IpcStreamReaderjava.io.IOException - any errorpublic boolean nextBoolValue()
throws java.io.IOException
nextBoolValue in interface IpcStreamReaderjava.io.IOException - any error.public double nextDoubleValue()
throws java.io.IOException
nextDoubleValue in interface IpcStreamReaderjava.io.IOException - any errorpublic long nextLongValue()
throws java.io.IOException
nextLongValue in interface IpcStreamReaderjava.io.IOException - any errorpublic java.lang.String nextStringValue()
throws java.io.IOException
nextStringValue in interface IpcStreamReaderjava.io.IOException - any errorpublic byte[] nextBinaryValue()
throws java.io.IOException
nextBinaryValue in interface IpcStreamReaderjava.io.IOException - any error.public IpcToken nextToken() throws java.io.IOException
nextToken in interface IpcStreamReaderjava.io.IOException - any errorpublic <T> T readObject(java.lang.Class<T> type)
throws java.io.IOException
T - desired class.type - desired class.java.io.IOException - parse error.public java.io.InputStream getStream()
UnsupportedOperationException. We have no
access to internal stream here, stream is wrapped in Jackson implementation.getStream in interface IpcStreamReader