@Override protected JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, InputStream in) throws IOException { return new ByteSourceJsonBootstrapper(ioCtxt, in) .constructParser(readCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), readCtxt.getFormatReadFeatures(_formatReadFeatures), _byteSymbolCanonicalizer, _rootCharSymbols, _factoryFeatures); }
/** * @deprecated Since 3.0 use {@link #createParser(ObjectReadContext,char[])} */ @Deprecated public JsonParser createParser(char[] content) throws IOException { return createParser(ObjectReadContext.empty(), content, 0, content.length); }
default JsonParser createParser(byte[] content) throws IOException { return getParserFactory().createParser(this, content); }
@Override protected YAMLParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, char[] data, int offset, int len, boolean recyclable) throws IOException { return new YAMLParser(readCtxt, ioCtxt, _getBufferRecycler(), readCtxt.getStreamReadFeatures(_streamReadFeatures), new CharArrayReader(data, offset, len)); }
@Override protected ProtobufParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, byte[] data, int offset, int len) throws IOException { return new ProtobufParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), (ProtobufSchema) readCtxt.getSchema(), null, data, offset, len, false); }
private final JavaPropsSchema _getSchema(ObjectReadContext readCtxt) { FormatSchema sch = readCtxt.getSchema(); if (sch == null) { return JavaPropsParser.DEFAULT_SCHEMA; } return (JavaPropsSchema) sch; }
@Override protected YAMLParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, Reader r) throws IOException { return new YAMLParser(readCtxt, ioCtxt, _getBufferRecycler(), readCtxt.getStreamReadFeatures(_streamReadFeatures), r); }
@Override protected ProtobufParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, InputStream in) throws IOException { byte[] buf = ioCtxt.allocReadIOBuffer(); return new ProtobufParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), (ProtobufSchema) readCtxt.getSchema(), in, buf, 0, 0, true); }
private final CsvSchema _getSchema(ObjectReadContext readCtxt) { FormatSchema sch = readCtxt.getSchema(); if (sch == null) { return DEFAULT_SCHEMA; } return (CsvSchema) sch; }
@Override protected JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, Reader r) throws IOException { return new ReaderBasedJsonParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), readCtxt.getFormatReadFeatures(_formatReadFeatures), r, _rootCharSymbols.makeChild(_factoryFeatures)); }
public IonParser createParser(ObjectReadContext readCtxt, IonReader in) { return new IonParser(readCtxt, _createContext(in, false), readCtxt.getStreamReadFeatures(_streamReadFeatures), in, _system); }
/** * @deprecated Since 3.0 use {@link #createParser(ObjectReadContext,java.net.URL)} */ @Deprecated public JsonParser createParser(URL src) throws IOException { return createParser(ObjectReadContext.empty(), src); }
default JsonParser createParser(byte[] content, int offset, int length) throws IOException { return getParserFactory().createParser(this, content, offset, length); }
@Override protected JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, byte[] data, int offset, int len) throws IOException { return new ByteSourceJsonBootstrapper(ioCtxt, data, offset, len) .constructParser(readCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), readCtxt.getFormatReadFeatures(_formatReadFeatures), _byteSymbolCanonicalizer, _rootCharSymbols, _factoryFeatures); }
private JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, InputStream in) throws IOException { IonReader ion = _system.newReader(in); return new IonParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), ion, _system); }
/** * @deprecated Since 3.0 use {@link #createParser(ObjectReadContext,String)} */ @Deprecated public JsonParser createParser(String content) throws IOException { return createParser(ObjectReadContext.empty(), content); }
default JsonParser createParser(InputStream in) throws IOException { return getParserFactory().createParser(this, in); }
@Override protected JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, char[] data, int offset, int len, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), readCtxt.getFormatReadFeatures(_formatReadFeatures), null, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
private JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, Reader r) throws IOException { return new IonParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), _system.newReader(r), _system); }
/** * @deprecated Since 3.0 use {@link #createParser(ObjectReadContext,java.io.File)} */ @Deprecated public JsonParser createParser(File src) throws IOException { return createParser(ObjectReadContext.empty(), src); }