public class ChecksumVerifyingInputStream extends InputStream
| Constructor and Description |
|---|
ChecksumVerifyingInputStream(Checksum
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
|
int |
read()
Reads a single byte from the stream
|
int |
read(byte[] b)
Reads a byte array from the stream
|
int |
read(byte[] b, int off, int len)
Reads from the stream into a byte array.
|
long |
skip(long n)
|
available, mark, markSupported, resetpublic ChecksumVerifyingInputStream(Checksumchecksum, InputStream in, long size, long expectedChecksum)
public int read()
throws IOException
read in class
InputStream
IOException - if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected value
public int read(byte[] b)
throws IOException
read in class
InputStream
IOException - if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected value
public int read(byte[] b,
int off,
int len)
throws IOException
read in class
InputStream
IOException - if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected value
public long skip(long n)
throws IOException
skip in class
InputStream
IOException
public void close()
throws IOException
close in interface
Closeable
close in interface
AutoCloseable
close in class
InputStream
IOException