Ejemplo n.º 1
0
 /**
  * Constructs a new PutObjectRequest object to upload a stream of
  * data to the specified bucket and key. After constructing the request,
  * users may optionally specify object metadata or a canned ACL as well.
  */
 public PutObjectRequest(String bucketName, String key, Stream input, ObjectMetadata metadata)
 {
     this.bucketName = bucketName;
     this.key = key;
     this.inputStream = input;
     this.metadata = metadata;
 }
Ejemplo n.º 2
0
 /**
  * Sets the optional metadata instructing KS3 how to handle the uploaded
  * data (e.g. custom user metadata, hooks for specifying content type,
  * etc.).
  * <p>
  * If uploading from an input stream, <b>always</b> specify metadata with
  * the content size set. Otherwise the contents of the input stream have to
  * be buffered in memory before being sent to KS3. This can cause very
  * negative performance impacts.
  * </p>
  */
 public void setMetadata(ObjectMetadata metadata)
 {
     this.metadata = metadata;
 }