List of usage examples for com.fasterxml.jackson.core.json UTF8StreamJsonParser UTF8StreamJsonParser
public UTF8StreamJsonParser(IOContext ctxt, int features, InputStream in, ObjectCodec codec, BytesToNameCanonicalizer sym, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
From source file:jp.opencollector.guacamole.auth.delegated.DelegatedAuthenticationProvider.java
private static JsonParser createJsonParser(InputStream is, Charset charset, ObjectCodec codec) { final IOContext ctxt = new IOContext(new BufferRecycler(), is, false); if (charset.equals(UTF_8)) { final byte[] buf = ctxt.allocReadIOBuffer(); return new UTF8StreamJsonParser(ctxt, 0, is, codec, byteSymbolCanonicalizer.makeChild(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.getMask()), buf, 0, 0, true);// w ww.j av a 2s .co m } else { return new ReaderBasedJsonParser(ctxt, 0, new InputStreamReader(is, charset), codec, symbolCanonicalizer.makeChild(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.getMask())); } }
From source file:io.protostuff.JsonIOUtil.java
/** * Creates a {@link UTF8StreamJsonParser} from the inputstream with the supplied buf {@code inBuffer} to use. *///from w w w . ja v a 2 s. c om static UTF8StreamJsonParser newJsonParser(InputStream in, byte[] buf, int offset, int limit, boolean bufferRecyclable, IOContext context) throws IOException { return new UTF8StreamJsonParser(context, DEFAULT_JSON_FACTORY.getParserFeatures(), in, DEFAULT_JSON_FACTORY.getCodec(), DEFAULT_JSON_FACTORY.getRootByteSymbols().makeChild(true, true), buf, offset, limit, bufferRecyclable); }