java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.util.zip.CheckedInputStream
public class CheckedInputStream
An input stream that also maintains a checksum of the data being read. The checksum can then be used to verify the integrity of the input data.
Field Summary |
---|
Fields inherited from class java.io. FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
CheckedInputStream
(
InputStream
in,
Checksum
cksum) Creates an input stream using the specified Checksum. |
Method Summary | |
---|---|
Checksum |
getChecksum
() Returns the Checksum for this input stream. |
int |
read
() Reads a byte. |
int |
read
(byte[] buf, int off, int len) Reads into an array of bytes. |
long |
skip
(long n) Skips specified number of bytes of input. |
Methods inherited from class java.io. FilterInputStream |
---|
available , close , mark , markSupported , read , reset |
Methods inherited from class java.lang. Object |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
---|
public CheckedInputStream(InputStream in, Checksum cksum)
Method Detail |
---|
public int read() throws IOException
public int read(byte[] buf, int off, int len) throws IOException
public long skip(long n) throws IOException
public Checksum getChecksum()