Class AwsChunkedEncodingInputStream

All Implemented Interfaces:
Closeable, AutoCloseable, Releasable
Direct Known Subclasses:
AwsSignedChunkedEncodingInputStream, AwsUnsignedChunkedEncodingInputStream

public abstract class AwsChunkedEncodingInputStream extends AwsChunkedInputStream
A wrapper of InputStream that implements pseudo-chunked-encoding. Each chunk will be buffered for the calculation of the chunk signature which is added at the head of each chunk.
The default chunk size cannot be customized, since we need to calculate the expected encoded stream length before reading the wrapped stream.
This class will use the mark() & reset() of the wrapped InputStream if they are supported, otherwise it will create a buffer for bytes read from the wrapped stream.
  • Method Details

    • read

      public int read(byte[] b, int off, int len) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • mark

      public void mark(int readlimit)
      The readlimit parameter is ignored.
      Overrides:
      mark in class InputStream
    • reset

      public void reset() throws IOException
      Reset the stream, either by resetting the wrapped stream or using the buffer created by this class.
      Overrides:
      reset in class InputStream
      Throws:
      IOException