Class DigestInputStream

    • Field Detail

      • digest

        protected Digest digest
    • Constructor Detail

      • DigestInputStream

        public DigestInputStream​(InputStream stream,
                                 Digest digest)
    • Method Detail

      • read

        public int read()
                 throws IOException
        Description copied from class: FilterInputStream
        Reads a single byte from the filtered stream and returns it as an integer in the range from 0 to 255. Returns -1 if the end of this stream has been reached.
        Overrides:
        read in class FilterInputStream
        Returns:
        the byte read or -1 if the end of the filtered stream has been reached.
        Throws:
        IOException - if the stream is closed or another IOException occurs.
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws IOException
        Description copied from class: InputStream
        Reads up to byteCount bytes from this stream and stores them in the byte array buffer starting at byteOffset. Returns the number of bytes actually read or -1 if the end of the stream has been reached.
        Overrides:
        read in class FilterInputStream
        Throws:
        IOException - if the stream is closed or another IOException occurs.
      • getDigest

        public Digest getDigest()