/** * Sets the input stream containing this object's contents. * * @param objectContent * The input stream containing this object's contents. Will get * wrapped in an S3ObjectInputStream. * @see S3Object#getObjectContent() */ public void setObjectContent(InputStream objectContent) { setObjectContent(new S3ObjectInputStream(objectContent, this.objectContent != null ? this.objectContent.getHttpRequest() : null)); }
/** * Returns an updated object where the object content input stream contains the decrypted contents. * * @param wrapper * The object whose contents are to be decrypted. * @param cekMaterial * The instruction that will be used to decrypt the object data. * @return * The updated object where the object content input stream contains the decrypted contents. */ private S3ObjectWrapper decrypt(S3ObjectWrapper wrapper, ContentCryptoMaterial cekMaterial, long[] range) { S3ObjectInputStream objectContent = wrapper.getObjectContent(); wrapper.setObjectContent(new S3ObjectInputStream( new CipherLiteInputStream(objectContent, cekMaterial.getCipherLite(), DEFAULT_BUFFER_SIZE), objectContent.getHttpRequest())); return wrapper; }
S3ObjectInputStream objectContent = s3object.getObjectContent(); InputStream adjustedRangeContents = new AdjustedRangeInputStream(objectContent, range[0], range[1]); s3object.setObjectContent(new S3ObjectInputStream(adjustedRangeContents, objectContent.getHttpRequest())); return s3object; } catch (IOException e) {
s3Object.setKey(getObjectRequest.getKey()); InputStream is = s3Object.getObjectContent(); HttpRequestBase httpRequest = s3Object.getObjectContent().getHttpRequest();
/** * Sets the input stream containing this object's contents. * * @param objectContent * The input stream containing this object's contents. Will get * wrapped in an S3ObjectInputStream. * @see S3Object#getObjectContent() */ public void setObjectContent(InputStream objectContent) { setObjectContent(new S3ObjectInputStream(objectContent, this.objectContent != null ? this.objectContent.getHttpRequest() : null)); }
/** * Returns an updated object where the object content input stream contains * the decrypted contents. * * @param object The object whose contents are to be decrypted. * @param instruction The instruction that will be used to decrypt the * object data. * @return The updated object where the object content input stream contains * the decrypted contents. */ public static S3Object decryptObjectUsingInstruction(S3Object object, EncryptionInstruction instruction) { S3ObjectInputStream objectContent = object.getObjectContent(); InputStream decryptedInputStream = new RepeatableCipherInputStream(objectContent, instruction.getCipherFactory()); object.setObjectContent(new S3ObjectInputStream(decryptedInputStream, objectContent .getHttpRequest())); return object; }
range[0], range[1]); object.setObjectContent(new S3ObjectInputStream(adjustedRangeContents, objectContent.getHttpRequest())); return object; } catch (IOException e) {
/** * Returns an updated object where the object content input stream contains the decrypted contents. * * @param wrapper * The object whose contents are to be decrypted. * @param cekMaterial * The instruction that will be used to decrypt the object data. * @return * The updated object where the object content input stream contains the decrypted contents. */ private S3ObjectWrapper decrypt(S3ObjectWrapper wrapper, ContentCryptoMaterial cekMaterial, long[] range) { final S3ObjectInputStream objectContent = wrapper.getObjectContent(); wrapper.setObjectContent(new S3ObjectInputStream( new CipherLiteInputStream(objectContent, cekMaterial.getCipherLite(), DEFAULT_BUFFER_SIZE), objectContent.getHttpRequest())); return wrapper; }
public InconsistentS3InputStream(S3ObjectInputStream wrapped) { // seems awkward to have the stream wrap itself. super(wrapped, wrapped.getHttpRequest()); this.wrapped = wrapped; }
final S3ObjectInputStream objectContent = s3object.getObjectContent(); final InputStream adjustedRangeContents = new AdjustedRangeInputStream(objectContent, range[0], range[1]); s3object.setObjectContent(new S3ObjectInputStream(adjustedRangeContents, objectContent.getHttpRequest())); return s3object; } catch (final IOException e) {
/** * Sets the input stream containing this object's contents. * * @param objectContent * The input stream containing this object's contents. Will get * wrapped in an S3ObjectInputStream. * @see S3Object#getObjectContent() */ public void setObjectContent(InputStream objectContent) { setObjectContent(new S3ObjectInputStream(objectContent, this.objectContent != null ? this.objectContent.getHttpRequest() : null)); }
/** * Sets the input stream containing this object's contents. * * @param objectContent * The input stream containing this object's contents. Will get * wrapped in an S3ObjectInputStream. * @see S3Object#getObjectContent() */ public void setObjectContent(InputStream objectContent) { setObjectContent(new S3ObjectInputStream(objectContent, this.objectContent != null ? this.objectContent.getHttpRequest() : null)); }
/** * Returns an updated object where the object content input stream contains * the decrypted contents. * * @param object The object whose contents are to be decrypted. * @param instruction The instruction that will be used to decrypt the * object data. * @return The updated object where the object content input stream contains * the decrypted contents. */ public static S3Object decryptObjectUsingInstruction(S3Object object, EncryptionInstruction instruction) { S3ObjectInputStream objectContent = object.getObjectContent(); InputStream decryptedInputStream = new RepeatableCipherInputStream(objectContent, instruction.getCipherFactory()); object.setObjectContent(new S3ObjectInputStream(decryptedInputStream, objectContent .getHttpRequest())); return object; }
range[0], range[1]); object.setObjectContent(new S3ObjectInputStream(adjustedRangeContents, objectContent.getHttpRequest())); return object; } catch (IOException e) {
/** * Returns an updated object where the object content input stream contains the decrypted contents. * * @param wrapper * The object whose contents are to be decrypted. * @param cekMaterial * The instruction that will be used to decrypt the object data. * @return * The updated object where the object content input stream contains the decrypted contents. */ private S3ObjectWrapper decrypt(S3ObjectWrapper wrapper, ContentCryptoMaterial cekMaterial, long[] range) { final S3ObjectInputStream objectContent = wrapper.getObjectContent(); wrapper.setObjectContent(new S3ObjectInputStream( new CipherLiteInputStream(objectContent, cekMaterial.getCipherLite(), DEFAULT_BUFFER_SIZE), objectContent.getHttpRequest())); return wrapper; }
/** * Returns an updated object where the object content input stream contains the decrypted contents. * * @param wrapper * The object whose contents are to be decrypted. * @param cekMaterial * The instruction that will be used to decrypt the object data. * @return * The updated object where the object content input stream contains the decrypted contents. */ private S3ObjectWrapper decrypt(S3ObjectWrapper wrapper, ContentCryptoMaterial cekMaterial, long[] range) { S3ObjectInputStream objectContent = wrapper.getObjectContent(); wrapper.setObjectContent(new S3ObjectInputStream( new CipherLiteInputStream(objectContent, cekMaterial.getCipherLite(), DEFAULT_BUFFER_SIZE), objectContent.getHttpRequest())); return wrapper; }
S3ObjectInputStream objectContent = s3object.getObjectContent(); InputStream adjustedRangeContents = new AdjustedRangeInputStream(objectContent, range[0], range[1]); s3object.setObjectContent(new S3ObjectInputStream(adjustedRangeContents, objectContent.getHttpRequest())); return s3object; } catch (IOException e) {
final S3ObjectInputStream objectContent = s3object.getObjectContent(); final InputStream adjustedRangeContents = new AdjustedRangeInputStream(objectContent, range[0], range[1]); s3object.setObjectContent(new S3ObjectInputStream(adjustedRangeContents, objectContent.getHttpRequest())); return s3object; } catch (final IOException e) {
s3Object.setKey(getObjectRequest.getKey()); InputStream is = s3Object.getObjectContent(); HttpRequestBase httpRequest = s3Object.getObjectContent().getHttpRequest();