Package com.amazonaws.util

Examples of com.amazonaws.util.LengthCheckInputStream


                    }
                }
            } else {
                // Ensures the data received from S3 has the same length as the
                // expected content-length
                is = new LengthCheckInputStream(is,
                    s3Object.getObjectMetadata().getContentLength(), // expected length
                    INCLUDE_SKIPPED_BYTES); // bytes received from S3 are all included even if skipped
            }

            // Re-wrap within an S3ObjectInputStream. Explicitly do not collect
View Full Code Here


                // Performs length check on the underlying data stream.
                // For S3 encryption client, the underlying data stream here
                // refers to the cipher-text data stream (ie not the underlying
                // plain-text data stream which in turn may have been wrapped
                // with it's own length check input stream.)
                @SuppressWarnings("resource")
                LengthCheckInputStream lcis = new LengthCheckInputStream(
                    input,
                    expectedLength, // expected data length to be uploaded
                    EXCLUDE_SKIPPED_BYTES);
                input = lcis;
            }
View Full Code Here

                // Performs length check on the underlying data stream.
                // For S3 encryption client, the underlying data stream here
                // refers to the cipher-text data stream (ie not the underlying
                // plain-text data stream which in turn may have been wrapped
                // with it's own length check input stream.)
                @SuppressWarnings("resource")
                LengthCheckInputStream lcis = new LengthCheckInputStream(
                    input,
                    expectedLength, // expected data length to be uploaded
                    EXCLUDE_SKIPPED_BYTES);
                input = lcis;
            }
View Full Code Here

                    }
                }
            } else {
                // Ensures the data received from S3 has the same length as the
                // expected content-length
                is = new LengthCheckInputStream(is,
                    s3Object.getObjectMetadata().getContentLength(), // expected length
                    INCLUDE_SKIPPED_BYTES); // bytes received from S3 are all included even if skipped
            }

            // Re-wrap within an S3ObjectInputStream. Explicitly do not collect
View Full Code Here

                    }
                }
            } else {
                // Ensures the data received from S3 has the same length as the
                // expected content-length
                input = new LengthCheckInputStream(input,
                    s3Object.getObjectMetadata().getContentLength(), // expected length
                    INCLUDE_SKIPPED_BYTES); // bytes received from S3 are all included even if skipped
            }

            // Re-wrap within an S3ObjectInputStream. Explicitly do not collect
View Full Code Here

                // Performs length check on the underlying data stream.
                // For S3 encryption client, the underlying data stream here
                // refers to the cipher-text data stream (ie not the underlying
                // plain-text data stream which in turn may have been wrapped
                // with it's own length check input stream.)
                @SuppressWarnings("resource")
                LengthCheckInputStream lcis = new LengthCheckInputStream(
                    input,
                    expectedLength, // expected data length to be uploaded
                    EXCLUDE_SKIPPED_BYTES);
                input = lcis;
            }
View Full Code Here

                    }
                }
            } else {
                // Ensures the data received from S3 has the same length as the
                // expected content-length
                is = new LengthCheckInputStream(is,
                    s3Object.getObjectMetadata().getContentLength(), // expected length
                    INCLUDE_SKIPPED_BYTES); // bytes received from S3 are all included even if skipped
            }

            // Re-wrap within an S3ObjectInputStream. Explicitly do not collect
View Full Code Here

                    // Performs length check on the underlying data stream.
                    // For S3 encryption client, the underlying data stream here
                    // refers to the cipher-text data stream (ie not the underlying
                    // plain-text data stream which in turn may have been wrapped
                    // with it's own length check input stream.)
                    @SuppressWarnings("resource")
                    LengthCheckInputStream lcis = new LengthCheckInputStream(
                        input,
                        expectedLength, // expected data length to be uploaded
                        EXCLUDE_SKIPPED_BYTES);
                    input = lcis;
                }
View Full Code Here

                // therefore won't exceed the maximum length that can be
                // encrypted either using any cipher such as CBC or GCM.
               
                // This ensures the plain-text read from the underlying data
                // stream has the same length as the expected total.
                isCurr = new LengthCheckInputStream(isCurr, plaintextLength,
                        EXCLUDE_SKIPPED_BYTES);
            }
            final CipherLite cipherLite = cekMaterial.getCipherLite();

            if (cipherLite.markSupported()) {
View Full Code Here

                is = new RepeatableFileInputStream(request.getFile());
            }
            if (plaintextLength > -1) {
                // This ensures the plain-text read from the underlying data
                // stream has the same length as the expected total
                is = new LengthCheckInputStream(is, plaintextLength,
                        EXCLUDE_SKIPPED_BYTES);
            }
            return new RepeatableCipherInputStream(is, cipherFactory);
        } catch (Exception e) {
            throw new AmazonClientException("Unable to create cipher input stream: " + e.getMessage(), e);
View Full Code Here

TOP

Related Classes of com.amazonaws.util.LengthCheckInputStream

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.