Class AdjustedRangeInputStream

  • All Implemented Interfaces:
    com.amazonaws.internal.MetricAware, com.amazonaws.internal.Releasable, Closeable, AutoCloseable

    public class AdjustedRangeInputStream
    extends com.amazonaws.internal.SdkInputStream
    Reads only a specific range of bytes from the underlying input stream.
    • Constructor Detail

      • AdjustedRangeInputStream

        public AdjustedRangeInputStream​(InputStream objectContents,
                                        long rangeBeginning,
                                        long rangeEnd)
                                 throws IOException
        Creates a new DecryptedContentsInputStream object.
        Parameters:
        objectContents - The input stream containing the object contents retrieved from S3
        rangeBeginning - The position of the left-most byte desired by the user
        rangeEnd - The position of the right-most byte desired by the user
        Throws:
        IOException - If there are errors skipping to the left-most byte desired by the user.