public final class AwsChunkedEncodingInputStream
extends com.amazonaws.internal.SdkInputStream
Constructor and Description |
---|
AwsChunkedEncodingInputStream(java.io.InputStream in,
byte[] kSigning,
java.lang.String datetime,
java.lang.String keyPath,
java.lang.String headerSignature,
AWS4Signer aws4Signer)
A wrapper of InputStream that implements pseudo-chunked-encoding.
|
AwsChunkedEncodingInputStream(java.io.InputStream in,
int maxBufferSize,
byte[] kSigning,
java.lang.String datetime,
java.lang.String keyPath,
java.lang.String headerSignature,
AWS4Signer aws4Signer)
A wrapper of InputStream that implements pseudo-chunked-encoding.
|
Modifier and Type | Method and Description |
---|---|
static long |
calculateStreamContentLength(long originalLength)
calculates the content length of the stream.
|
void |
mark(int readlimit)
The read limit parameter is ignored if an internal buffer is being used
because the underlying input stream does not support mark, or INTEGER_MAX
if underlying input stream does support marking.
|
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset()
Reset the stream, either by resetting the wrapped stream or using the
buffer created by this class.
|
long |
skip(long n) |
public AwsChunkedEncodingInputStream(java.io.InputStream in, byte[] kSigning, java.lang.String datetime, java.lang.String keyPath, java.lang.String headerSignature, AWS4Signer aws4Signer)
in
- The original InputStream.kSigning
- Signing key.datetime
- Datetime, as used in SigV4.keyPath
- Keypath/Scope, as used in SigV4.headerSignature
- The signature of the signed headers. This will be
used for calculating the signature of the first chunk.aws4Signer
- The AWS4Signer used for hashing and signing.public AwsChunkedEncodingInputStream(java.io.InputStream in, int maxBufferSize, byte[] kSigning, java.lang.String datetime, java.lang.String keyPath, java.lang.String headerSignature, AWS4Signer aws4Signer)
in
- The original InputStream.maxBufferSize
- Maximum number of bytes buffered by this class.kSigning
- Signing key.datetime
- Datetime, as used in SigV4.keyPath
- Keypath/Scope, as used in SigV4.headerSignature
- The signature of the signed headers. This will be
used for calculating the signature of the first chunk.aws4Signer
- The AWS4Signer used for hashing and signing.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
InputStream.markSupported()
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public static long calculateStreamContentLength(long originalLength)
originalLength
- the original content length.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.