|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.unboundid.util.json.JSONObjectReader
@ThreadSafety(level=NOT_THREADSAFE) public final class JSONObjectReader
This class provides a mechanism for reading JSON objects from an input stream. It assumes that any non-ASCII data that may be read from the input stream is encoded as UTF-8.
| Constructor Summary | |
|---|---|
JSONObjectReader(java.io.InputStream inputStream)
Creates a new JSON object reader that will read objects from the provided input stream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this JSON object reader and the underlying input stream. |
JSONObject |
readObject()
Reads the next JSON object from the input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSONObjectReader(java.io.InputStream inputStream)
inputStream - The input stream from which the data should be read.| Method Detail |
|---|
public JSONObject readObject()
throws java.io.IOException,
JSONException
null if the end of the
end of the stream has been reached..
java.io.IOException - If a problem is encountered while reading from the
input stream.
JSONException - If the data read
public void close()
throws java.io.IOException
close in interface java.io.Closeablejava.io.IOException - If a problem is encountered while closing the
underlying input stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||