public class SdkDigestInputStream extends java.security.DigestInputStream implements MetricAware
DigestInputStream.| Constructor and Description |
|---|
SdkDigestInputStream(java.io.InputStream stream,
java.security.MessageDigest digest) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isMetricActivated()
Deprecated.
|
long |
skip(long n)
Skips over and discards
n bytes of data from this input
stream, while taking the skipped bytes into account for digest
calculation. |
getMessageDigest, on, read, read, setMessageDigest, toStringpublic SdkDigestInputStream(java.io.InputStream stream,
java.security.MessageDigest digest)
@Deprecated public final boolean isMetricActivated()
MetricAwareisMetricActivated in interface MetricAwarepublic final long skip(long n)
throws java.io.IOException
n bytes of data from this input
stream, while taking the skipped bytes into account for digest
calculation. The skip method may, for a variety of reasons,
end up skipping over some smaller number of bytes, possibly
0. This may result from any of a number of conditions;
reaching end of file before n bytes have been skipped is
only one possibility. The actual number of bytes skipped is returned. If
n is negative, no bytes are skipped.
The skip method of this class creates a byte array and then
repeatedly reads into it until n bytes have been read or the
end of the stream has been reached. Subclasses are encouraged to provide
a more efficient implementation of this method. For instance, the
implementation may depend on the ability to seek.
skip in class java.io.FilterInputStreamn - 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.