public final class RenewableCipherLiteInputStream extends CipherLiteInputStream
CipherLiteInputStream
that supports partial
mark-and-reset in the sense that, if the underlying input stream supports
mark-and-reset, this input stream can then be marked at and get reset back to
the very beginning of the stream (but not anywhere else).限定符 | 构造器和说明 |
---|---|
protected |
RenewableCipherLiteInputStream(java.io.InputStream is) |
|
RenewableCipherLiteInputStream(java.io.InputStream is,
com.tencent.cos.xml.crypto.CipherLite cipherLite) |
|
RenewableCipherLiteInputStream(java.io.InputStream is,
com.tencent.cos.xml.crypto.CipherLite c,
int buffsize) |
|
RenewableCipherLiteInputStream(java.io.InputStream is,
com.tencent.cos.xml.crypto.CipherLite c,
int buffsize,
boolean multipart,
boolean lastMultiPart) |
限定符和类型 | 方法和说明 |
---|---|
void |
mark(int readlimit)
Mark and reset is currently only partially supported, in the sense that,
if the underlying input stream supports mark-and-reset, this input stream
can then be marked at and get reset back to the very beginning of the
stream (but not anywhere else).
|
boolean |
markSupported()
Mark and reset is currently only partially supported, in the sense that,
if the underlying input stream supports mark-and-reset, this input stream
can then be marked at and get reset back to the very beginning of the
stream (but not anywhere else).
|
int |
read()
Reads the next byte of data from this input stream.
|
int |
read(byte[] b)
Reads up to
byte.length bytes of data from this
input stream into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads up to
len bytes of data from this input stream
into an array of bytes. |
void |
reset()
Resets back to the very beginning of the stream.
|
long |
skip(long n)
Skips over and discards
n bytes of data from the
input stream. |
available, close
abort, abortIfNeeded, isAborted, release
public RenewableCipherLiteInputStream(java.io.InputStream is, com.tencent.cos.xml.crypto.CipherLite cipherLite)
public RenewableCipherLiteInputStream(java.io.InputStream is, com.tencent.cos.xml.crypto.CipherLite c, int buffsize)
public RenewableCipherLiteInputStream(java.io.InputStream is, com.tencent.cos.xml.crypto.CipherLite c, int buffsize, boolean multipart, boolean lastMultiPart)
protected RenewableCipherLiteInputStream(java.io.InputStream is)
public boolean markSupported()
markSupported
在类中 CipherLiteInputStream
true
if this stream type supports the
mark
and reset
method;
false
otherwise.FilterInputStream.in
,
InputStream.mark(int)
,
InputStream.reset()
public void mark(int readlimit)
mark
在类中 CipherLiteInputStream
readlimit
- the maximum limit of bytes that can be read before
the mark position becomes invalid.java.lang.UnsupportedOperationException
- if mark is called after this stream has been accessed.FilterInputStream.in
,
FilterInputStream.reset()
public void reset() throws java.io.IOException
Mark and reset is currently only partially supported, in the sense that, if the underlying input stream supports mark-and-reset, this input stream can then be marked at and get reset back to the very beginning of the stream (but not anywhere else).
reset
在类中 CipherLiteInputStream
java.io.IOException
- if the stream has not been marked or if the
mark has been invalidated.FilterInputStream.in
,
FilterInputStream.mark(int)
public int read() throws java.io.IOException
java.io.FilterInputStream
int
in the range
0
to 255
. If no byte is available
because the end of the stream has been reached, the value
-1
is returned. This method blocks until input data
is available, the end of the stream is detected, or an exception
is thrown.
This method
simply performs in.read()
and returns the result.
read
在类中 CipherLiteInputStream
-1
if the end of the
stream is reached.java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public int read(byte[] b) throws java.io.IOException
java.io.FilterInputStream
byte.length
bytes of data from this
input stream into an array of bytes. This method blocks until some
input is available.
This method simply performs the call
read(b, 0, b.length)
and returns
the result. It is important that it does
not do in.read(b)
instead;
certain subclasses of FilterInputStream
depend on the implementation strategy actually
used.
read
在类中 CipherLiteInputStream
b
- the buffer into which the data is read.-1
if there is no more data because the end of
the stream has been reached.java.io.IOException
- if an I/O error occurs.FilterInputStream.read(byte[], int, int)
public int read(byte[] b, int off, int len) throws java.io.IOException
java.io.FilterInputStream
len
bytes of data from this input stream
into an array of bytes. If len
is not zero, the method
blocks until some input is available; otherwise, no
bytes are read and 0
is returned.
This method simply performs in.read(b, off, len)
and returns the result.
read
在类中 CipherLiteInputStream
b
- the buffer into which the data is read.off
- the start offset in the destination array b
len
- the maximum number of bytes read.-1
if there is no more data because the end of
the stream has been reached.java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public long skip(long n) throws java.io.IOException
java.io.FilterInputStream
n
bytes of data from the
input stream. The skip
method may, for a variety of
reasons, end up skipping over some smaller number of bytes,
possibly 0
. The actual number of bytes skipped is
returned.
This method simply performs in.skip(n)
.
skip
在类中 CipherLiteInputStream
n
- the number of bytes to be skipped.java.io.IOException
- if the stream does not support seek,
or if some other I/O error occurs.