@Test(expected = JsonFormatException.class) public void v_long_overflow() throws Exception { JsonFormat<Data> format = reader((r, d) -> d.object = r.readLong()) .build(); try (ModelInput<Data> in = format.open("<testing>", inputf("{'p': %d}", BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.valueOf(1))), IOPTS)) { read(in); } }
public JsonInput<T> open( String path, InputStream input, Collection<? extends InputOption> options) throws IOException { JsonEncoding encoding = ENCODING_MAP.get(charset); if (encoding != null) { return createInput(path, factory.createParser(input), options); } else { return open(path, new InputStreamReader(input, charset), options); } }
JsonFormat { public JsonInput<T> open( String path, InputStream input, Collection<? extends InputOption> options) throws IOException { JsonEncoding encoding = ENCODING_MAP.get(charset); if (encoding != null) { return createInput(path, factory.createParser(input), options); } else { return open(path, new InputStreamReader(input, charset), options); } } }
JsonFormat { public JsonInput<T> open( String path, InputStream input, Collection<? extends InputOption> options) throws IOException { JsonEncoding encoding = ENCODING_MAP.get(charset); if (encoding != null) { return createInput(path, factory.createParser(input), options); } else { return open(path, new InputStreamReader(input, charset), options); } } protected  JsonFormat(Builder<T> builder); }
JsonFormat { public JsonInput<T> open( String path, InputStream input, Collection<? extends InputOption> options) throws IOException { JsonEncoding encoding = ENCODING_MAP.get(charset); if (encoding != null) { return createInput(path, factory.createParser(input), options); } else { return open(path, new InputStreamReader(input, charset), options); } } protected  JsonFormat(Builder<T> builder); static Builder<T> builder(Class<T> dataType); JsonInput<T> open(
            String path, InputStream input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, OutputStream output, Collection<? extends OutputOption> options); JsonInput<T> open(
            String path, Reader input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, Writer output, Collection<? extends OutputOption> options); }
JsonFormat { public JsonInput<T> open( String path, InputStream input, Collection<? extends InputOption> options) throws IOException { JsonEncoding encoding = ENCODING_MAP.get(charset); if (encoding != null) { return createInput(path, factory.createParser(input), options); } else { return open(path, new InputStreamReader(input, charset), options); } } protected  JsonFormat(Builder<T> builder); static Builder<T> builder(Class<T> dataType); JsonInput<T> open(
            String path, InputStream input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, OutputStream output, Collection<? extends OutputOption> options); JsonInput<T> open(
            String path, Reader input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, Writer output, Collection<? extends OutputOption> options); static final JsonFactory DEFAULT_JSON_FACTORY; static final Charset DEFAULT_CHARSET; static final LineSeparator DEFAULT_LINE_SEPARATOR; static final boolean DEFAULT_USE_PLAIN_DECIMAL; static final boolean DEFAULT_ESCAPE_NO_ASCII_CHARACTER; static final ErrorAction DEFAULT_ON_UNKNOWN_INPUT; static final Set<InputOption> DEFAULT_INPUT_OPTIONS; static final Set<OutputOption> DEFAULT_OUTPUT_OPTIONS; }