Class MessageDigestCalculatingInputStream.MessageDigestMaintainingObserver

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.security.MessageDigest md  
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void data​(byte[] pBuffer, int pOffset, int pLength)
      Called to indicate, that InputStream.read(byte[]), or InputStream.read(byte[], int, int) have been called, and are about to invoke data.
      (package private) void data​(int pByte)
      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
    • Field Detail

      • md

        private final java.security.MessageDigest md
    • Constructor Detail

      • MessageDigestMaintainingObserver

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

      • data

        void data​(byte[] pBuffer,
                  int pOffset,
                  int pLength)
           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:
        pBuffer - The byte array, which has been passed to the read call, and where data has been stored.
        pOffset - The offset within the byte array, where data has been stored.
        pLength - The number of bytes, which have been stored in the byte array.
        Throws:
        java.io.IOException - if an i/o-error occurs