/** * @since 2.4 */ protected final Reader _decorate(Reader in, IOContext ctxt) throws IOException { if (_inputDecorator != null) { Reader in2 = _inputDecorator.decorate(ctxt, in); if (in2 != null) { return in2; } } return in; }
/** * @since 2.4 */ protected final InputStream _decorate(InputStream in, IOContext ctxt) throws IOException { if (_inputDecorator != null) { InputStream in2 = _inputDecorator.decorate(ctxt, in); if (in2 != null) { return in2; } } return in; }
/** * @since 2.8 */ protected final DataInput _decorate(DataInput in, IOContext ctxt) throws IOException { if (_inputDecorator != null) { DataInput in2 = _inputDecorator.decorate(ctxt, in); if (in2 != null) { return in2; } } return in; }
protected DataInput _decorate(IOContext ioCtxt, DataInput in) throws IOException { if (_inputDecorator != null) { DataInput in2 = _inputDecorator.decorate(ioCtxt, in); if (in2 != null) { return in2; } } return in; }
protected InputStream _decorate(IOContext ioCtxt, InputStream in) throws IOException { if (_inputDecorator != null) { InputStream in2 = _inputDecorator.decorate(ioCtxt, in); if (in2 != null) { return in2; } } return in; }
protected Reader _decorate(IOContext ioCtxt, Reader in) throws IOException { if (_inputDecorator != null) { Reader in2 = _inputDecorator.decorate(ioCtxt, in); if (in2 != null) { return in2; } } return in; }
@Override public YAMLParser createParser(byte[] data, int offset, int len) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, offset, len); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, offset, len, ctxt); }
@Override public YAMLParser createParser(byte[] data) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, 0, data.length); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, 0, data.length, ctxt); }
/** * Method for constructing parser for parsing * the contents of given byte array. * * @since 2.1 */ public JsonParser createParser(byte[] data) throws IOException, JsonParseException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, 0, data.length); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, 0, data.length, ctxt); }
/** * Method for constructing parser for parsing * the contents of given byte array. * * @param data Buffer that contains data to parse * @param offset Offset of the first data byte within buffer * @param len Length of contents to parse within buffer * * @since 2.1 */ public JsonParser createParser(byte[] data, int offset, int len) throws IOException, JsonParseException { IOContext ctxt = _createContext(data, true); // [JACKSON-512]: allow wrapping with InputDecorator if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, offset, len); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, offset, len, ctxt); }
@Override public JsonParser createParser(ObjectReadContext readCtxt, byte[] data, int offset, int len) throws IOException { IOContext ioCtxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ioCtxt, data, offset, len); if (in != null) { return _createParser(readCtxt, ioCtxt, in); } } return _createParser(readCtxt, ioCtxt, data, offset, len); }
@Override public JsonParser createParser(ObjectReadContext readCtxt, byte[] data, int offset, int len) throws IOException { IOContext ioCtxt = _createContext(data, true, null); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ioCtxt, data, offset, len); if (in != null) { return _createParser(readCtxt, ioCtxt, in); } } return _createParser(readCtxt, ioCtxt, data, offset, len); }
@Override public YAMLParser createParser(byte[] data, int offset, int len) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, offset, len); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, offset, len, ctxt); }
@Override public YAMLParser createParser(byte[] data) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, 0, data.length); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, 0, data.length, ctxt); }
@SuppressWarnings("resource") @Override public BsonParser createParser(File f) throws IOException { IOContext ctxt = _createContext(f, true); InputStream in = new FileInputStream(f); if (_inputDecorator != null) { in = _inputDecorator.decorate(ctxt, in); } return _createParser(in, ctxt); }
@SuppressWarnings("resource") @Override public JsonParser createParser(Reader r) throws IOException, JsonParseException { IOContext ctxt = _createContext(r, false); if (_inputDecorator != null) { r = _inputDecorator.decorate(ctxt, r); } return _createParser(r, ctxt); }
@Override public BsonParser createParser(InputStream in) throws IOException { IOContext ctxt = _createContext(in, false); if (_inputDecorator != null) { in = _inputDecorator.decorate(ctxt, in); } return _createParser(in, ctxt); }
@SuppressWarnings("resource") @Override public CBORParser createParser(byte[] data, int offset, int len) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, 0, data.length); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, offset, len, ctxt); }
@Override public BsonParser createParser(byte[] data, int offset, int len) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, offset, len); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, offset, len, ctxt); }
@SuppressWarnings("resource") @Override public SmileParser createParser(byte[] data, int offset, int len) throws IOException { IOContext ctxt = _createContext(data, true); if (_inputDecorator != null) { InputStream in = _inputDecorator.decorate(ctxt, data, 0, data.length); if (in != null) { return _createParser(in, ctxt); } } return _createParser(data, offset, len, ctxt); }