public abstract class AwsChunkedEncodingInputStream extends SdkInputStream
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AwsChunkedEncodingInputStream.Builder<T extends AwsChunkedEncodingInputStream.Builder> |
| Modifier | Constructor and Description |
|---|---|
protected |
AwsChunkedEncodingInputStream(InputStream in,
AwsChunkedEncodingConfig config)
Creates a chunked encoding input stream initialized with the originating stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
createChunk(byte[] chunkData)
Creates chunk for the given buffer.
|
protected abstract byte[] |
createFinalChunk(byte[] finalChunk)
The final chunk.
|
protected InputStream |
getWrappedInputStream()
Returns the underlying input stream, if any, from the subclass; or null
if there is no underlying input stream.
|
void |
mark(int readlimit)
The readlimit parameter is ignored.
|
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) |
abort, abortIfNeeded, releaseavailable, close, readclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseprotected AwsChunkedEncodingInputStream(InputStream in, AwsChunkedEncodingConfig config)
in - The original InputStream.config - The configuration allows the user to customize chunk size and buffer size.
See AwsChunkedEncodingConfig for default values.public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreamInputStream.markSupported()public void mark(int readlimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionprotected InputStream getWrappedInputStream()
SdkInputStreamgetWrappedInputStream in class SdkInputStreamprotected abstract byte[] createFinalChunk(byte[] finalChunk)
finalChunk - The last byte which will be often 0 byte.protected abstract byte[] createChunk(byte[] chunkData)
chunkData - The chunk of original data.Copyright © 2021. All rights reserved.