public static class MessageDigestCalculatingInputStream.MessageDigestMaintainingObserver extends ObservableInputStream.Observer
| Constructor and Description |
|---|
MessageDigestMaintainingObserver(java.security.MessageDigest messageDigest)
Creates an MessageDigestMaintainingObserver for the given MessageDigest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
data(byte[] input,
int offset,
int length)
Called to indicate that
InputStream.read(byte[]), or InputStream.read(byte[], int, int) have
been called, and are about to invoke data. |
void |
data(int input)
Called to indicate, that
InputStream.read() has been invoked on the ObservableInputStream,
and will return a value. |
closed, error, finishedpublic MessageDigestMaintainingObserver(java.security.MessageDigest messageDigest)
messageDigest - the message digest to usepublic void data(byte[] input,
int offset,
int length)
throws java.io.IOException
ObservableInputStream.ObserverInputStream.read(byte[]), or InputStream.read(byte[], int, int) have
been called, and are about to invoke data.data in class ObservableInputStream.Observerinput - The byte array, which has been passed to the read call, and where data has been stored.offset - The offset within the byte array, where data has been stored.length - The number of bytes, which have been stored in the byte array.java.io.IOException - if an I/O error occurs.public void data(int input)
throws java.io.IOException
ObservableInputStream.ObserverInputStream.read() has been invoked on the ObservableInputStream,
and will return a value.data in class ObservableInputStream.Observerinput - The value, which is being returned. This will never be -1 (EOF), because, in that case,
ObservableInputStream.Observer.finished() will be invoked instead.java.io.IOException - if an I/O error occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved