Examples of UploadPartResult


Examples of com.amazonaws.services.s3.model.UploadPartResult

            httpRequest.setContent(inputStream);
            S3MetadataResponseHandler responseHandler = new S3MetadataResponseHandler();
            ObjectMetadata metadata = client.execute(httpRequest, responseHandler, errorResponseHandler);
            fireProgressEvent(progressListener, ProgressEvent.PART_COMPLETED_EVENT_CODE);

            UploadPartResult result = new UploadPartResult();
            result.setETag(metadata.getETag());
            result.setPartNumber(partNumber);
            return result;
        } catch (AmazonClientException ace) {
            fireProgressEvent(progressListener, ProgressEvent.PART_FAILED_EVENT_CODE);
            throw ace;
        } finally {
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

                    "This part was specified as the last part in a multipart upload, but a previous part was already marked as the last part.  "
                        + "Only the last part of the upload should be marked as the last part.");
            }
        }

        UploadPartResult result = s3.uploadPart(req);
        if (isLastPart)
            uploadContext.setHasFinalPartBeenSeen(true);
        return result;
    }
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

        // Treat all encryption requests as input stream upload requests, not as file upload requests.
        uploadPartRequest.setFile(null);
        uploadPartRequest.setFileOffset(0);

        UploadPartResult result = s3.uploadPart(uploadPartRequest);
        if (isLastPart)
            encryptedUploadContext.setHasFinalPartBeenSeen(true);
        encryptedUploadContext.setNextInitializationVector(encryptedInputStream.getBlock());
        return result;
    }
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

            ExecutionContext executionContext = new ExecutionContext(requestHandlers);
            S3MetadataResponseHandler responseHandler = new S3MetadataResponseHandler();
            ObjectMetadata metadata = client.execute(request, responseHandler, errorResponseHandler, executionContext);
            fireProgressEvent(progressListener, ProgressEvent.PART_COMPLETED_EVENT_CODE);

            UploadPartResult result = new UploadPartResult();
            result.setETag(metadata.getETag());
            result.setPartNumber(partNumber);
            return result;
        } catch (AmazonClientException ace) {
            fireProgressEvent(progressListener, ProgressEvent.PART_FAILED_EVENT_CODE);
            throw ace;
        } finally {
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

        req.setUploadId(dataPart.getUploadID());
        req.setPartNumber(dataPart.getPartNo());
        req.setPartSize(dataPart.getPartData().length);
        req.setMd5Digest(SystemUtils.toBase64(dataPart.getMd5()));
        req.setInputStream(new ByteArrayInputStream(dataPart.getPartData()));
        UploadPartResult res = client.uploadPart(req);
        PartETag partETag = res.getPartETag();
        if (!partETag.getETag().equals(SystemUtils.toHex(dataPart.getMd5())))
            throw new BackupRestoreException("Unable to match MD5 for part " + dataPart.getPartNo());
        partETags.add(partETag);
        return null;
    }
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

                }
            }

            fireProgressEvent(progressListener, ProgressEvent.PART_COMPLETED_EVENT_CODE);

            UploadPartResult result = new UploadPartResult();
            result.setETag(metadata.getETag());
            result.setPartNumber(partNumber);
            result.setServerSideEncryption(metadata.getServerSideEncryption());
            return result;
        } catch (AmazonClientException ace) {
            fireProgressEvent(progressListener, ProgressEvent.PART_FAILED_EVENT_CODE);
            throw ace;
        } finally {
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

                        + "You may need to delete the data stored in Amazon S3. "
                        + "(" + info + ")");
                }
            }
            publishProgress(listener, ProgressEventType.TRANSFER_PART_COMPLETED_EVENT);
            UploadPartResult result = new UploadPartResult();
            result.setETag(etag);
            result.setPartNumber(partNumber);
            result.setSSEAlgorithm(metadata.getSSEAlgorithm());
            result.setSSECustomerAlgorithm(metadata.getSSECustomerAlgorithm());
            result.setSSECustomerKeyMd5(metadata.getSSECustomerKeyMd5());
            return result;
        } catch (Throwable t) {
            publishProgress(listener, ProgressEventType.TRANSFER_PART_FAILED_EVENT);
            // Leaving this here in case anyone is depending on it, but it's
            // inconsistent with other methods which only generate one of
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

        if (uploadContext == null) {
            throw new AmazonClientException(
                "No client-side information available on upload ID " + uploadId);
        }
        final SdkFilterInputStream is;
        final UploadPartResult result;
        // Checks the parts are uploaded in series
        uploadContext.beginPartUpload(req.getPartNumber());
        try {
            CipherLite cipherLite = cipherLiteForNextPart(uploadContext);
            is = wrapForMultipart(
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

                }
            }

            fireProgressEvent(progressListener, ProgressEvent.PART_COMPLETED_EVENT_CODE);

            UploadPartResult result = new UploadPartResult();
            result.setETag(metadata.getETag());
            result.setPartNumber(partNumber);
            result.setServerSideEncryption(metadata.getServerSideEncryption());
            return result;
        } catch (AmazonClientException ace) {
            fireProgressEvent(progressListener, ProgressEvent.PART_FAILED_EVENT_CODE);
            throw ace;
        } finally {
View Full Code Here

Examples of com.amazonaws.services.s3.model.UploadPartResult

                }
            }

            fireProgressEvent(progressListener, ProgressEvent.PART_COMPLETED_EVENT_CODE);

            UploadPartResult result = new UploadPartResult();
            result.setETag(metadata.getETag());
            result.setPartNumber(partNumber);
            return result;
        } catch (AmazonClientException ace) {
            fireProgressEvent(progressListener, ProgressEvent.PART_FAILED_EVENT_CODE);
            throw ace;
        } finally {
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.