| java.lang.Object | |||
| ↳ | java.io.InputStream | ||
| ↳ | java.io.FilterInputStream | ||
| ↳ | java.util.zip.CheckedInputStream | ||
The CheckedInputStream class is used to maintain a running Checksum of all data read from a stream.
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.FilterInputStream
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new CheckedInputStream on InputStream is.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the Checksum calculated on the stream thus far.
| |||||||||||
Reads up to nbytes of data from the underlying stream, storing it in buf,
starting at offset off.
| |||||||||||
Reads a byte of data from the underlying stream and recomputes the
Checksum with the byte data.
| |||||||||||
Skip upto nbytes of data on the underlying stream.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.io.FilterInputStream
| |||||||||||
From class java.io.InputStream
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.io.Closeable
| |||||||||||
Constructs a new CheckedInputStream on InputStream is. The Checksum will be calculated using the algorithm implemented by csum.
| is | InputStream to calculate checksum from |
|---|---|
| csum | Type of Checksum to calculate |
Returns the Checksum calculated on the stream thus far.
Reads up to nbytes of data from the underlying stream, storing it in buf, starting at offset off. The Checksum is updated with the bytes read.
| buf | the byte array in which to store the read bytes. |
|---|---|
| off | the offset in buffer to store the read bytes. |
| nbytes | the maximum number of bytes to store in buffer. |
| IOException |
|---|
Reads a byte of data from the underlying stream and recomputes the Checksum with the byte data.
| IOException |
|---|
Skip upto nbytes of data on the underlying stream. Any skipped bytes are added to the running Checksum value.
| nbytes | long Number of bytes to skip |
|---|
| IOException |
|---|