com.ibm.portal.streaming.json
Class JsonParserReader
java.lang.Object
java.io.Reader
com.ibm.portal.streaming.json.JsonParserReader
- All Implemented Interfaces:
- JsonStream, Streamable, Writable, java.io.Closeable, java.lang.Readable, java.nio.channels.Channel
-
public abstract class JsonParserReader
- extends java.io.Reader
- implements Writable, Streamable, java.nio.channels.Channel, JsonStream
Implementation of a pull parser to decode JSON data as defined in RFC 4627.
The JSON object will be represented as a sequence of JsonParserReader.Entry objects
(similar to the concept of the ZipInputStream). Each JsonParserReader.Entry
denotes a syntactical entity of the JSON object, e.g. the start or end of an
object, an array or a value. Depending on the type of the entry the content
can be accessed via the DataInput interface or as a character stream
via the Reader interface on either the entry or the parser.
- Since:
- 7.0.0.1
Fields inherited from class java.io.Reader
|
lock |
Methods inherited from class java.io.Reader
|
close, mark, markSupported, read, read, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.utilities.streams.Writable
|
write |
Methods inherited from interface com.ibm.utilities.streams.Streamable
|
write |
Methods inherited from interface java.nio.channels.Channel
|
close, isOpen |
JsonParserReader
public JsonParserReader()
closeEntry
public abstract void closeEntry()
throws java.io.IOException
- Closes the entry and positions the stream for the next entry
- Throws:
- java.io.IOException - if an I/O error has occurred
getNextEntry
public abstract JsonParserReader.Entry getNextEntry()
throws java.io.IOException
- Returns the next entry and closes a previous entry if required
- Returns:
- the next entry or null if no next entry exists
- Throws:
- java.io.IOException - if an I/O error has occurred