public ByteSourceJsonBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; // _inputProcessed = 0; _bufferRecyclable = true; }
public ByteSourceJsonBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; // _inputProcessed = 0; _bufferRecyclable = true; }
/** * Creates a smile pipe from an {@link InputStream}. */ public static Pipe newPipe(InputStream in, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_SMILE_FACTORY._getBufferRecycler(), in, false); final SmileParser parser = newSmileParser(in, context.allocReadIOBuffer(), 0, 0, true, context); return JsonIOUtil.newPipe(parser, numeric); // return JsonIOUtil.newPipe(DEFAULT_SMILE_FACTORY.createJsonParser(in), numeric); }
/** * Creates a json pipe from an {@link InputStream}. */ public static Pipe newPipe(InputStream in, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_JSON_FACTORY._getBufferRecycler(), in, false); final JsonParser parser = newJsonParser(in, context.allocReadIOBuffer(), 0, 0, true, context); return newPipe(parser, numeric); }
/** * Merges the {@code message} from the {@link InputStream} using the given {@code schema}. */ public static <T> void mergeFrom(InputStream in, T message, Schema<T> schema, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_SMILE_FACTORY._getBufferRecycler(), in, false); final SmileParser parser = newSmileParser(in, context.allocReadIOBuffer(), 0, 0, true, context); // final SmileParser parser = DEFAULT_SMILE_FACTORY.createJsonParser(in); try { JsonIOUtil.mergeFrom(parser, message, schema, numeric); } finally { parser.close(); } }
/** * Merges the {@code message} from the {@link InputStream} using the given {@code schema}. */ public static <T> void mergeFrom(InputStream in, T message, Schema<T> schema, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_JSON_FACTORY._getBufferRecycler(), in, false); final JsonParser parser = newJsonParser(in, context.allocReadIOBuffer(), 0, 0, true, context); // final JsonParser parser = DEFAULT_JSON_FACTORY.createJsonParser(in); try { mergeFrom(parser, message, schema, numeric); } finally { parser.close(); } }
/** * Parses the {@code messages} from the stream using the given {@code schema}. */ public static <T> List<T> parseListFrom(InputStream in, Schema<T> schema, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_SMILE_FACTORY._getBufferRecycler(), in, false); final SmileParser parser = newSmileParser(in, context.allocReadIOBuffer(), 0, 0, true, context); // final SmileParser parser = DEFAULT_SMILE_FACTORY.createJsonParser(in); try { return JsonIOUtil.parseListFrom(parser, schema, numeric); } finally { parser.close(); } }
/** * Parses the {@code messages} from the stream using the given {@code schema}. */ public static <T> List<T> parseListFrom(InputStream in, Schema<T> schema, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_JSON_FACTORY._getBufferRecycler(), in, false); final JsonParser parser = newJsonParser(in, context.allocReadIOBuffer(), 0, 0, true, context); // final JsonParser parser = DEFAULT_JSON_FACTORY.createJsonParser(in); try { return parseListFrom(parser, schema, numeric); } finally { parser.close(); } }
public CBORParserBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; _inputProcessed = 0; _bufferRecyclable = true; }
public JacksonAvroParserImpl(ObjectReadContext readCtxt, IOContext ioCtxt, int parserFeatures, int avroFeatures, AvroSchema schema, InputStream in) { super(readCtxt, ioCtxt, parserFeatures, avroFeatures, schema); _inputStream = in; _inputBuffer = ioCtxt.allocReadIOBuffer(); _inputPtr = 0; _inputEnd = 0; _bufferRecyclable = true; }
public NonBlockingParserBase(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym) { super(ctxt, parserFeatures, smileFeatures, sym); // We don't need a lot; for most things maximum known a-priori length below 70 bytes _inputCopy = ctxt.allocReadIOBuffer(500); _currToken = null; _majorState = MAJOR_INITIAL; }
public SmileParserBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; _inputProcessed = 0; _bufferRecyclable = true; }
public ByteSourceJsonBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; _inputProcessed = 0; _bufferRecyclable = true; }
public CsvParserBootstrapper(IOContext ctxt, ObjectCodec codec, InputStream in) { _context = ctxt; _codec = codec; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; _inputProcessed = 0; }
public CBORParserBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; _inputProcessed = 0; _bufferRecyclable = true; }
public ByteSourceJsonBootstrapper(IOContext ctxt, InputStream in) { _context = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; // _inputProcessed = 0; _bufferRecyclable = true; }
public SmileParserBootstrapper(IOContext ctxt, InputStream in) { _ioContext = ctxt; _in = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputEnd = _inputPtr = 0; _inputProcessed = 0; _bufferRecyclable = true; }
public UTF8Reader(IOContext ctxt, InputStream in, boolean autoClose) { super(in); _ioContext = ctxt; _inputSource = in; _inputBuffer = ctxt.allocReadIOBuffer(); _inputPtr = 0; _inputEnd = 0; _autoClose = autoClose; }
@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); }
/** * Creates a json pipe from an {@link InputStream}. */ public static Pipe newPipe(InputStream in, boolean numeric) throws IOException { final IOContext context = new IOContext(DEFAULT_JSON_FACTORY._getBufferRecycler(), in, false); final JsonParser parser = newJsonParser(in, context.allocReadIOBuffer(), 0, 0, true, context); return newPipe(parser, numeric); }