Common base class used to wrap an InputStream with a cipher input stream to encrypt it, and handles resets by attempting to reset on the original, unencrypted data InputStream, and recreate an identical Cipher and identical CipherInputStream on the original data.
It's repeatable if and only if the underlying unencryptedDataStream is repeatable - if the underlying input stream is not repeatable and you're going to buffer to make it repeatable anyways, it makes more sense to do so after wrapping in this object, so we buffer the encrypted data and don't have to bother re-encrypting on retry.
This stream only supports being marked before the first call to
read
or skip
, since it's not possible to rewind the
encryption state of a CipherInputStream
to an arbitrary point. If you
call mark
after calling read
or skip
, it will throw
an UnsupportedOperationException
.
@Deprecated public abstract class AbstractRepeatableCipherInputStream<T> extends SdkFilterInputStream
Modifier and Type | Method and Description |
---|---|
void |
mark(int readlimit)
Deprecated.
|
boolean |
markSupported()
Deprecated.
|
int |
read()
Deprecated.
|
int |
read(byte[] b)
Deprecated.
|
int |
read(byte[] b,
int off,
int len)
Deprecated.
|
void |
reset()
Deprecated.
|
long |
skip(long n)
Deprecated.
|
abort, available, close, getDelegateStream, isMetricActivated, release
public boolean markSupported()
markSupported
in class SdkFilterInputStream
public void mark(int readlimit)
mark
in class SdkFilterInputStream
public void reset() throws IOException
reset
in class SdkFilterInputStream
IOException
public int read() throws IOException
read
in class SdkFilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class SdkFilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class SdkFilterInputStream
IOException