use of org.apache.jena.atlas.io.PeekReader in project jena by apache.
the class JSONParser method parseAny.
/** Parse to get a Json primitive */
public static void parseAny(InputStream input, JSONHandler handler) {
PeekReader r = PeekReader.makeUTF8(input);
TokenizerJSON t = new TokenizerJSON(r);
parseAny(t, handler);
}
use of org.apache.jena.atlas.io.PeekReader in project jena by apache.
the class JSONParser method parse.
/** Parse to get a Json object */
public static void parse(Reader reader, JSONHandler handler) {
PeekReader r = PeekReader.make(reader);
TokenizerJSON t = new TokenizerJSON(r);
parse(t, handler);
}
use of org.apache.jena.atlas.io.PeekReader in project jena by apache.
the class JSONParser method parseAny.
/** Parse to get a Json primitive */
public static void parseAny(Reader reader, JSONHandler handler) {
PeekReader r = PeekReader.make(reader);
TokenizerJSON t = new TokenizerJSON(r);
parseAny(t, handler);
}
use of org.apache.jena.atlas.io.PeekReader in project jena by apache.
the class Token method create.
static Token create(String s) {
PeekReader pr = PeekReader.readString(s);
TokenizerText tt = new TokenizerText(pr);
if (!tt.hasNext())
throw new RiotException("No token");
Token t = tt.next();
if (tt.hasNext())
throw new RiotException("Extraneous charcaters");
return t;
}
use of org.apache.jena.atlas.io.PeekReader in project jena by apache.
the class TokenizerFactory method makeTokenizerUTF8.
public static Tokenizer makeTokenizerUTF8(InputStream in) {
// BOM will be removed
PeekReader peekReader = PeekReader.makeUTF8(in);
Tokenizer tokenizer = new TokenizerText(peekReader);
return tokenizer;
}
Aggregations