/** * Add a body to this request from a stream, with application/octet-stream as its content type * * @param stream InputStream of the content to be sent to the server * @return this builder */ protected BodyRequestBuilder body(final InputStream stream) { return body(stream, null); }
@Override public PutBuilder body(final File file, final String contentType) throws IOException { return (PutBuilder) super.body(file, contentType); }
/** * Add a body to this request from a stream, with application/sparql-update as its content type * * @param stream InputStream of the content to be sent to the server * @return this builder */ @Override public PatchBuilder body(final InputStream stream) { return (PatchBuilder) super.body(stream, SPARQL_UPDATE); }
@Override public PatchBuilder body(final InputStream stream, final String contentType) { return (PatchBuilder) super.body(stream, contentType); }
@Override public PostBuilder body(final InputStream stream, final String contentType) { return (PostBuilder) super.body(stream, contentType); }
@Override public PostBuilder body(final InputStream stream) { return (PostBuilder) super.body(stream); }
@Override public PostBuilder body(final File file, final String contentType) throws IOException { return (PostBuilder) super.body(file, contentType); }
@Override public PutBuilder body(final InputStream stream, final String contentType) { return (PutBuilder) super.body(stream, contentType); }
@Override public PutBuilder body(final InputStream stream) { return (PutBuilder) super.body(stream); }
/** * Add the given file as the body for this request with the provided content type * * @param file File containing the content to be sent to the server * @param contentType the Content-Type of the body * @return this builder * @throws IOException when unable to stream the body file */ protected BodyRequestBuilder body(final File file, final String contentType) throws IOException { return body(new FileInputStream(file), contentType); }