public class AdjustedRangeInputStream extends SdkInputStream
Modifier and Type | Field and Description |
---|---|
private boolean |
closed |
private java.io.InputStream |
decryptedContents |
private long |
virtualAvailable |
Constructor and Description |
---|
AdjustedRangeInputStream(java.io.InputStream objectContents,
long rangeBeginning,
long rangeEnd)
Creates a new DecryptedContentsInputStream object.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
protected java.io.InputStream |
getWrappedInputStream()
Returns the underlying input stream, if any, from the subclass; or null
if there is no underlying input stream.
|
private void |
initializeForRead(long rangeBeginning,
long rangeEnd)
Skip to the start location of the range of bytes desired by the user.
|
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
abort, abortIfNeeded, isMetricActivated, release
private java.io.InputStream decryptedContents
private long virtualAvailable
private boolean closed
public AdjustedRangeInputStream(java.io.InputStream objectContents, long rangeBeginning, long rangeEnd) throws java.io.IOException
objectContents
- The input stream containing the object contents retrieved from S3rangeBeginning
- The position of the left-most byte desired by the userrangeEnd
- The position of the right-most byte desired by the userjava.io.IOException
- If there are errors skipping to the left-most byte desired by the user.private void initializeForRead(long rangeBeginning, long rangeEnd) throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
protected java.io.InputStream getWrappedInputStream()
SdkInputStream
getWrappedInputStream
in class SdkInputStream