Examples of closeDataInputStream()


Examples of org.jets3t.service.model.S3Object.closeDataInputStream()

        // Retrieve object to ensure it was correctly created.
        basicObject = s3Service.getObject(bucket, object.getKey());
        assertEquals("Unexpected default content type", Mimetypes.MIMETYPE_OCTET_STREAM,
            basicObject.getContentType());
        assertEquals("Unexpected size for 'empty' object", 0, basicObject.getContentLength());
        basicObject.closeDataInputStream();

        // Make sure bucket cannot be removed while it has contents.
        try {
            s3Service.deleteBucket(bucket.getName());
            fail("Cannot delete a bucket containing objects");
View Full Code Here

Examples of org.jets3t.service.model.S3Object.closeDataInputStream()

        StringBuffer sb = new StringBuffer();
        int b = -1;
        while ((b = dataObject.getDataInputStream().read()) != -1) {
            sb.append((char) b);
        }
        dataObject.closeDataInputStream();
        assertEquals("Mismatching data", objectData, sb.toString());

        // Retrieve only HEAD of data object (all metadata is available, but not the object content
        // data input stream)
        dataObject = s3Service.getObjectDetails(bucket, object.getKey());
View Full Code Here

Examples of org.jets3t.service.model.S3Object.closeDataInputStream()

                acl = AccessControlList.REST_CANNED_PUBLIC_READ;
                s3Object.setAcl(acl);
            }
            s3Service.putObject(baseBucketName, s3Object);
            progressWatcher.flush();
            s3Object.closeDataInputStream();
            cis.close();

            if(description != null)
            {
                String descObjName = getDescriptionFileKey(vmName, rw);
View Full Code Here

Examples of org.jets3t.service.model.StorageObject.closeDataInputStream()

        // and downgrade missing files
        return null;
      }
    } finally {
      if (object != null) {
        object.closeDataInputStream();
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.jets3t.service.model.StorageObject.closeDataInputStream()

      }
      handleServiceException(e);
      return null; //never returned - keep compiler happy
    } finally {
      if (object != null) {
        object.closeDataInputStream();
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.jets3t.service.model.StorageObject.closeDataInputStream()

            // Re-retrieve object to ensure it was correctly created.
            basicObject = service.getObject(bucketName, object.getKey());
            assertEquals("Unexpected content type",
                Mimetypes.MIMETYPE_OCTET_STREAM, basicObject.getContentType());
            assertEquals("Unexpected size for 'empty' object", 0, basicObject.getContentLength());
            basicObject.closeDataInputStream();

            // Make sure bucket cannot be removed while it has contents.
            try {
                service.deleteBucket(bucketName);
                fail("Should not be able to delete a bucket containing objects");
View Full Code Here

Examples of org.jets3t.service.model.StorageObject.closeDataInputStream()

            StringBuffer sb = new StringBuffer();
            int b = -1;
            while ((b = dataObject.getDataInputStream().read()) != -1) {
                sb.append((char) b);
            }
            dataObject.closeDataInputStream();
            assertEquals("Mismatching data", objectData, sb.toString());

            // Retrieve only HEAD of data object (all metadata is available, but not the object content
            // data input stream)
            dataObject = service.getObjectDetails(bucketName, object.getKey());
View Full Code Here

Examples of org.jets3t.service.model.StorageObject.closeDataInputStream()

      }
      handleServiceException(e);
      return null; //never returned - keep compiler happy
    } finally {
      if (object != null) {
        object.closeDataInputStream();
      }
    }
  }

  /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.