public final class BSONParser extends Object
BSONParseListener
,
JSONParser
Modifier and Type | Method and Description |
---|---|
static void |
parse(BSONParseListener l,
DataInput input)
This starts by firing l's
started()
method. |
public static void parse(BSONParseListener l, DataInput input) throws NullPointerException, ParseException, IOException
started()
method. It then reads the length then discards the value, then repeatedly
reads key names and tells the listener to read values, until either it runs out of values
or the listener tells the parser to stop. It then calls ended()
.
l
- the ParseListener that recieves events from this parserreader
- the reader that this will read chars from. It is assumed to be at the beginning of the streamskipChars
- the number of characters to skip in the reader before starting. This assumes any value after zero is after the initial '{' or '['.NullPointerException
- if either l or reader is nullParseException
- if the parsing failsIOException
- if the reader could not be read from