public class ChecksumInputStream extends FilterInputStream
in| Constructor and Description |
|---|
ChecksumInputStream(InputStream stream,
Checksummer cksummer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the subsumed stream.
|
Checksummer |
getChecksummer()
Returns the Checksummer object.
|
long |
getNBytes()
Returns the byte count to date on the stream.
|
int |
read()
Reads a byte from the subsumed stream, updating
the byte count and the checksums.
|
int |
read(byte[] b)
Reads some number of bytes from the input stream and
stores them into the buffer array b.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream
into an array of bytes.
|
long |
skip(long n)
Skips n bytes.
|
available, mark, markSupported, resetpublic ChecksumInputStream(InputStream stream, Checksummer cksummer)
stream - Stream to be filteredcksummer - Object to calculate checksum on the bytes
as they are readpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic long getNBytes()
public Checksummer getChecksummer()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.