@Override public Object getInputSource() { return delegate.getInputSource(); }
@Override public Object getInputSource() { return delegate.getInputSource(); }
private String getRawResponse(JsonParser jp) throws IOException { final InputStream inputSource = (InputStream) jp.getInputSource(); if (inputSource == null) { return ""; } inputSource.reset(); return streamToString(inputSource); }
private EventList readEvents(JsonParser jp, Event.EventContext context, DeserializationContext deserializationContext) throws IOException { Object inputSource = jp.getInputSource();
/** * Available for the edge case that content from a JsonParser must be written. */ @Override public void set(JsonParser parser) { this.parser = parser; if ( parser == null ) { content = null; } else if ( parser.getInputSource() instanceof InputStream ) { content = (InputStream) parser.getInputSource(); } }
@Override public Object getInputSource() { return delegate.getInputSource(); }
@Override public Object getInputSource() { return delegate.getInputSource(); }
@Override public Object getInputSource() { return delegate.getInputSource(); }
@Override public Object getInputSource() { return delegate.getInputSource(); }
@Override public Object getInputSource() { return delegate.getInputSource(); }
@Override public Object getInputSource() { return delegate.getInputSource(); }
private String getRawResponse(JsonParser jp) throws IOException { final InputStream inputSource = (InputStream) jp.getInputSource(); if (inputSource == null) { return ""; } inputSource.reset(); return streamToString(inputSource); }
private String getRawResponse(JsonParser jp) throws IOException { final InputStream inputSource = (InputStream) jp.getInputSource(); if (inputSource == null) { return ""; } inputSource.reset(); return streamToString(inputSource); }
private String getRawResponse(JsonParser jp) throws IOException { final InputStream inputSource = (InputStream) jp.getInputSource(); if (inputSource == null) { return ""; } inputSource.reset(); return streamToString(inputSource); }
private String getRawResponse(JsonParser jp) throws IOException { final InputStream inputSource = (InputStream) jp.getInputSource(); if (inputSource == null) { return ""; } inputSource.reset(); return streamToString(inputSource); }
private String getRawResponse(JsonParser jp) throws IOException { final InputStream inputSource = (InputStream)jp.getInputSource(); if (inputSource == null) { return ""; } inputSource.reset(); return streamToString(inputSource); }
private JsonParser getResetParser(JsonParser jp) throws IOException { JsonFactory factory = jp.getCodec().getFactory(); StringReader inputSource = (StringReader) jp.getInputSource(); inputSource.reset(); BufferedReader br = new BufferedReader(inputSource); String source = br.readLine(); return factory.createJsonParser(source); }
private static JsonNode readNode(final MappingIterator<JsonNode> iterator) throws IOException { final Object source = iterator.getParser().getInputSource(); final JsonParseExceptionBuilder builder = new JsonParseExceptionBuilder(source); builder.setMessage(BUNDLE.getMessage("read.noContent")); if (!iterator.hasNextValue()) throw builder.build(); final JsonNode ret = iterator.nextValue(); builder.setMessage(BUNDLE.getMessage("read.trailingData")) .setLocation(iterator.getCurrentLocation()); try { if (iterator.hasNextValue()) throw builder.build(); } catch (JsonParseException e) { throw builder.setLocation(e.getLocation()).build(); } return ret; }
private static JsonNode readNode(final MappingIterator<JsonNode> iterator) throws IOException { final Object source = iterator.getParser().getInputSource(); final JsonParseExceptionBuilder builder = new JsonParseExceptionBuilder(source); builder.setMessage(BUNDLE.getMessage("read.noContent")); if (!iterator.hasNextValue()) throw builder.build(); final JsonNode ret = iterator.nextValue(); builder.setMessage(BUNDLE.getMessage("read.trailingData")) .setLocation(iterator.getCurrentLocation()); try { if (iterator.hasNextValue()) throw builder.build(); } catch (JsonParseException e) { throw builder.setLocation(e.getLocation()).build(); } return ret; }