Class MessageDigestCalculatingInputStream.MessageDigestMaintainingObserver

    • Constructor Summary

      Constructors 
      Constructor Description
      MessageDigestMaintainingObserver​(java.security.MessageDigest messageDigest)
      Creates an MessageDigestMaintainingObserver for the given MessageDigest.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessageDigestMaintainingObserver

        public MessageDigestMaintainingObserver​(java.security.MessageDigest messageDigest)
        Creates an MessageDigestMaintainingObserver for the given MessageDigest.
        Parameters:
        messageDigest - the message digest to use
    • Method Detail

      • data

        public void data​(byte[] input,
                         int offset,
                         int length)
                  throws java.io.IOException
        Description copied from class: ObservableInputStream.Observer
        Called to indicate that InputStream.read(byte[]), or InputStream.read(byte[], int, int) have been called, and are about to invoke data.
        Overrides:
        data in class ObservableInputStream.Observer
        Parameters:
        input - 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.
        Throws:
        java.io.IOException - if an I/O error occurs.