org.apache.commons.compress.utils
public class CRC32VerifyingInputStream extends InputStream
| Constructor and Description |
|---|
CRC32VerifyingInputStream(InputStream in,
long size,
int expectedCrc32) |
| 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 CRC32VerifyingInputStream(InputStream in, long size, int expectedCrc32)
public int read()
throws IOException
read in class InputStreamIOException - if the underlying stream throws or the
stream is exhausted and the CRC doesn't match the expected
valuepublic int read(byte[] b)
throws IOException
read in class InputStreamIOException - if the underlying stream throws or the
stream is exhausted and the CRC doesn't match the expected
valuepublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException - if the underlying stream throws or the
stream is exhausted and the CRC doesn't match the expected
valuepublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in class InputStreamIOExceptionCopyright © 2013 The Apache Software Foundation. All rights reserved.