Package org.jclouds.io

Examples of org.jclouds.io.MutableContentMetadata


      String blobName = "test-blob";
      long oneMB = 1048576L;
      AzureBlobClient client = createMock(AzureBlobClient.class);
      PayloadSlicer slicer = createMock(PayloadSlicer.class);
      MutableBlobMetadata metadata = new MutableBlobMetadataImpl();
      MutableContentMetadata contentMetadata = new BaseMutableContentMetadata();
      contentMetadata.setContentLength(MultipartUploadStrategy.MAX_BLOCK_SIZE * 3 + oneMB);
      metadata.setName(blobName);
      metadata.setContentMetadata(contentMetadata);
      Blob blob = new BlobImpl(metadata);
      ByteSource bytes = ByteSource.wrap("ABCD".getBytes(Charsets.UTF_8));
      Payload payload = Payloads.newByteSourcePayload(bytes);
View Full Code Here


      AzureBlobClient client = createNiceMock(AzureBlobClient.class);
      PayloadSlicer slicer = createNiceMock(PayloadSlicer.class);

      MutableBlobMetadata metadata = new MutableBlobMetadataImpl();
      MutableContentMetadata contentMetadata = new BaseMutableContentMetadata();
      contentMetadata.setContentLength(MultipartUploadStrategy.MAX_BLOCK_SIZE * MultipartUploadStrategy.MAX_NUMBER_OF_BLOCKS + 1);
      metadata.setName(blobName);
      metadata.setContentMetadata(contentMetadata);
      Blob blob = new BlobImpl(metadata);
      ByteSource bytes = ByteSource.wrap("ABCD".getBytes(Charsets.UTF_8));
      Payload payload = Payloads.newByteSourcePayload(bytes);
View Full Code Here

TOP

Related Classes of org.jclouds.io.MutableContentMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.