protected Reader _createReader(InputStream in, JsonEncoding enc, IOContext ctxt) throws IOException { // default to UTF-8 if encoding missing if (enc == null || enc == JsonEncoding.UTF8) { // 28-May-2012, tatu: Custom UTF8 reader should be faster, esp for small input: // return new InputStreamReader(in, UTF8); boolean autoClose = ctxt.isResourceManaged() || isEnabled(JsonParser.Feature.AUTO_CLOSE_SOURCE); return new UTF8Reader(ctxt, in, autoClose); } return new InputStreamReader(in, enc.getJavaName()); }
protected Reader _createReader(InputStream in, JsonEncoding enc, IOContext ctxt) throws IOException { // default to UTF-8 if encoding missing if (enc == null || enc == JsonEncoding.UTF8) { // 28-May-2012, tatu: Custom UTF8 reader should be faster, esp for small input: // return new InputStreamReader(in, UTF8); boolean autoClose = ctxt.isResourceManaged() || this.isEnabled(JsonParser.Feature.AUTO_CLOSE_SOURCE); return new UTF8Reader(ctxt, in, autoClose); } return new InputStreamReader(in, enc.getJavaName()); }