@Override public String[] getCommonPrefixes() { return mChunk.getCommonPrefixes(); }
@Override public ObjectListingChunk getNextChunk() throws IOException { if (!mChunk.isListingComplete()) { StorageObjectsChunk nextChunk = getObjectListingChunk(mChunk.getPrefix(), mChunk.getDelimiter(), mChunk.getPriorLastKey()); if (nextChunk != null) { return new GCSObjectListingChunk(nextChunk); } } return null; } }
@Override public ObjectStatus[] getObjectStatuses() { StorageObject[] objects = mChunk.getObjects(); ObjectStatus[] ret = new ObjectStatus[objects.length]; for (int i = 0; i < ret.length; ++i) { ret[i] = new ObjectStatus(objects[i].getKey(), objects[i].getMd5HashAsBase64(), objects[i].getContentLength(), objects[i].getLastModifiedDate().getTime()); } return ret; }
AWSCredentials awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey); try { S3Service s3Service = new RestS3Service(awsCredentials); String key = formatLatLon(x, y) + ".tiff"; S3Object object = s3Service.getObject(awsBucketName, key); InputStream istream = object.getDataInputStream(); FileOutputStream ostream = new FileOutputStream(path);
@Override public S3Bucket createBucket(String bucketName) throws S3ServiceException { try { return this.createBucket(bucketName, getJetS3tProperties().getStringProperty( "s3service.default-bucket-location", "US"), null); } catch (ServiceException se) { throw new S3ServiceException(se); } }
@Override public S3Bucket getOrCreateBucket(String bucketName) throws S3ServiceException { try { return this.getOrCreateBucket(bucketName, getJetS3tProperties().getStringProperty( "s3service.default-bucket-location", "US")); } catch (ServiceException se) { throw new S3ServiceException(se); } }
public void run() { try { result = s3Service.copyObject(sourceBucketName, sourceObjectKey, destinationBucketName, destinationObject, replaceMetadata); } catch (ServiceException se) { result = new S3ServiceException(se); } }
@Override protected String getBucketLocationImpl(String bucketName) throws S3ServiceException { try { return super.getBucketLocationImpl(bucketName); } catch (ServiceException se) { throw new S3ServiceException(se); } }
@Override protected InputStream openObject(String key, OpenOptions options) throws IOException { try { return new GCSInputStream(mBucketName, key, mClient, options.getOffset()); } catch (ServiceException e) { throw new IOException(e.getMessage()); } } }
/** * @return * true if the "filecomparer.skip-symlinks" configuration option is set. */ public boolean isSkipSymlinks() { return jets3tProperties.getBoolProperty("filecomparer.skip-symlinks", false); }
public void run() { try { result = ((S3Service)storageService).multipartStartUpload(bucketName, (S3Object)object); } catch (ServiceException e) { result = e; } }
public void run() { try { result = ((S3Service)storageService).multipartCompleteUpload(multipartUpload); } catch (ServiceException e) { result = e; } }
/** * @return the credentials in the underlying storage service. */ public ProviderCredentials getProviderCredentials() { return storageService.getProviderCredentials(); }
/** * Deletes a bucket. Only the owner of a bucket may delete it. * <p> * This method cannot be performed by anonymous services. * * @param bucketName * the name of the bucket to delete. * @throws ServiceException */ public void deleteBucket(String bucketName) throws ServiceException { deleteBucketImpl(bucketName); }
/** * Delete a bucket's lifecycle configuration; removes the effect of any previously-applied * configuration. * * @param bucketName * a bucket with a lifecycle configuration. * @throws S3ServiceException */ public void deleteLifecycleConfig(String bucketName) throws S3ServiceException { deleteLifecycleConfigImpl(bucketName); }
@Override public S3Bucket createBucket(String bucketName) throws S3ServiceException { try { return this.createBucket(bucketName, getJetS3tProperties().getStringProperty( "s3service.default-bucket-location", "US"), null); } catch (ServiceException se) { throw new S3ServiceException(se); } }
@Override public S3Bucket getOrCreateBucket(String bucketName) throws S3ServiceException { try { return this.getOrCreateBucket(bucketName, getJetS3tProperties().getStringProperty( "s3service.default-bucket-location", "US")); } catch (ServiceException se) { throw new S3ServiceException(se); } }
public void run() { try { result = s3Service.copyObject(sourceBucketName, sourceObjectKey, destinationBucketName, destinationObject, replaceMetadata); } catch (ServiceException se) { result = new S3ServiceException(se); } }
@Override protected String getBucketLocationImpl(String bucketName) throws S3ServiceException { try { return super.getBucketLocationImpl(bucketName); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * @return * true if the "filecomparer.generate-md5-files" configuration option is set. */ public boolean isGenerateMd5Files() { return jets3tProperties.getBoolProperty("filecomparer.generate-md5-files", false); }