public class ChecksumVerifyingInputStream
extends java.util.zip.CheckedInputStream
| Constructor and Description |
|---|
ChecksumVerifyingInputStream(java.util.zip.Checksum checksum,
java.io.InputStream in,
long size,
long expectedChecksum)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRemaining()
Gets the byte count remaining to read.
|
int |
read()
Reads a single byte from the stream
|
int |
read(byte[] b,
int off,
int len)
Reads from the stream into a byte array.
|
public ChecksumVerifyingInputStream(java.util.zip.Checksum checksum,
java.io.InputStream in,
long size,
long expectedChecksum)
checksum - Checksum implementation.in - the stream to wrapsize - the of the stream's contentexpectedChecksum - the expected checksumpublic long getBytesRemaining()
public int read()
throws java.io.IOException
read in class java.util.zip.CheckedInputStreamjava.io.IOException - if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected valuepublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.util.zip.CheckedInputStreamjava.io.IOException - if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected valueCopyright © 2010 - 2024 Adobe. All Rights Reserved