|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.ipc.json.JsonStreamReader
public class JsonStreamReader
IPC reader implementation for the JSON protocol.
Method Summary | ||
---|---|---|
void |
close()
Closes the reader and the underlying stream. |
|
void |
closeWithoutStream()
Closes the reader but NOT the underlying stream. |
|
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 . |
|
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. |
|
|
readObject(java.lang.Class<T> type)
read object of desired class from JSON stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface IpcStreamReader
java.io.IOException
- any errorpublic void closeWithoutStream() throws java.io.IOException
closeWithoutStream
in interface IpcStreamReader
java.io.IOException
- any errorpublic boolean currentBoolValue() throws java.io.IOException
currentBoolValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic double currentDoubleValue() throws java.io.IOException
currentDoubleValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic long currentLongValue() throws java.io.IOException
currentLongValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic java.lang.String currentStringValue() throws java.io.IOException
currentStringValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic boolean nextBoolValue() throws java.io.IOException
nextBoolValue
in interface IpcStreamReader
java.io.IOException
- any error.public double nextDoubleValue() throws java.io.IOException
nextDoubleValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic long nextLongValue() throws java.io.IOException
nextLongValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic java.lang.String nextStringValue() throws java.io.IOException
nextStringValue
in interface IpcStreamReader
java.io.IOException
- any errorpublic IpcToken nextToken() throws java.io.IOException
nextToken
in interface IpcStreamReader
java.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
|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |