public class PutBuilder extends BodyRequestBuilder
client, request, targetUri| Constructor and Description |
|---|
PutBuilder(URI uri,
FcrepoClient client)
Instantiate builder
|
| Modifier and Type | Method and Description |
|---|---|
PutBuilder |
body(File file,
String contentType)
Add the given file as the body for this request with the provided content type
|
PutBuilder |
body(InputStream stream)
Add a body to this request from a stream, with application/octet-stream as its content type
|
PutBuilder |
body(InputStream stream,
String contentType)
Add a body to this request as a stream with the given content type
|
protected org.apache.http.client.methods.HttpRequestBase |
createRequest()
Creates the HTTP request object for this builder
|
PutBuilder |
digest(String digest)
Provide a SHA-1 checksum for the body of this request
|
PutBuilder |
ifMatch(String etag)
Provide an etag for the if-match header for this request
|
PutBuilder |
ifUnmodifiedSince(String modified)
Provide a if-unmodified-since header for this request
|
BodyRequestBuilder |
preferLenient()
Set the prefer header for this request to lenient handling, to indicate that server-managed triples will not
be included in the request body.
|
performpublic PutBuilder(URI uri, FcrepoClient client)
uri - uri of the resource this request is being made toclient - the clientprotected org.apache.http.client.methods.HttpRequestBase createRequest()
RequestBuildercreateRequest in class RequestBuilderpublic PutBuilder body(InputStream stream, String contentType)
BodyRequestBuilderbody in class BodyRequestBuilderstream - InputStream of the content to be sent to the servercontentType - the Content-Type of the bodypublic PutBuilder body(File file, String contentType) throws IOException
BodyRequestBuilderbody in class BodyRequestBuilderfile - File containing the content to be sent to the servercontentType - the Content-Type of the bodyIOException - when unable to stream the body filepublic PutBuilder body(InputStream stream)
BodyRequestBuilderbody in class BodyRequestBuilderstream - InputStream of the content to be sent to the serverpublic PutBuilder ifMatch(String etag)
BodyRequestBuilderifMatch in class BodyRequestBuilderetag - etag to provide as the if-match headerpublic PutBuilder ifUnmodifiedSince(String modified)
BodyRequestBuilderifUnmodifiedSince in class BodyRequestBuildermodified - date to provide as the if-unmodified-since headerpublic PutBuilder digest(String digest)
BodyRequestBuilderdigest in class BodyRequestBuilderdigest - sha-1 checksum to provide as the digest for the request bodypublic BodyRequestBuilder preferLenient()
Copyright © 2013-2016 DuraSpace, Inc.. All Rights Reserved.