Class IncrementalMacInputStream
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class IncrementalMacInputStream extends InputStream
-
-
Constructor Summary
Constructors Constructor Description IncrementalMacInputStream(InputStream input, Array<byte> key, ChunkSizeChoice sizeChoice, Array<byte> digest)
-
Method Summary
Modifier and Type Method Description intread()Read a single byte from input. intread(Array<byte> bytes, int offset, int length)Read several bytes into the destination array. voidclose()-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
IncrementalMacInputStream
IncrementalMacInputStream(InputStream input, Array<byte> key, ChunkSizeChoice sizeChoice, Array<byte> digest)
-
-
Method Detail
-
read
int read()
Read a single byte from input.
Tries to read at least one byte. In practice, it means the whole chunk will have to be read before even a single byte can be "released".
This method is here to satisfy the InputStream interface, but should be avoided if possible. Prefer read.
-
read
int read(Array<byte> bytes, int offset, int length)
Read several bytes into the destination array.
In a slight deviation from the InputStream API semantics, this method may return 0 as a way to signal to the caller that no bytes can be safely released. Subsequent reads will eventually return a non-zero value (either a positive number of bytes read, or -1 if the end of the input has been reached).
-
close
void close()
-
-
-
-