API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.security. DigestInputStream View Source
Author(s)
Benjamin Renaud
Since
Version
1.38 05/11/17
Serial
Hierarchy
 Object
      InputStream
          FilterInputStream
              DigestInputStream
Implements
Subclasses
Description
public class DigestInputStream
  A transparent stream that updates the associated message digest using the bits going through the stream.
Constructors
public DigestInputStream (InputStream stream, MessageDigest digest)
  Creates a digest input stream, using the specified input stream and message digest.
Methods
Hide/Show inherited methods
public int available () throws IOException [Inherited From FilterInputStream]
  Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
public void close () throws IOException [Inherited From FilterInputStream]
  Closes this input stream and releases any system resources associated with the stream.
public MessageDigest getMessageDigest ()
  Returns the message digest associated with this stream.
publicsynchronized void mark (int readlimit) [Inherited From FilterInputStream]
  Marks the current position in this input stream.
public boolean markSupported () [Inherited From FilterInputStream]
  Tests if this input stream supports the mark and reset methods.
public void on (boolean on)
  Turns the digest function on or off.
public int read () throws IOException [Overrides FilterInputStream] [Specified in InputStream]
  Reads a byte, and updates the message digest (if the digest function is on).
public int read (byte[] b) throws IOException [Inherited From FilterInputStream]
  Reads up to byte.length bytes of data from this input stream into an array of bytes.
public int read (byte[] b, int off, int len) throws IOException [Overrides FilterInputStream]
  Reads into a byte array, and updates the message digest (if the digest function is on).
publicsynchronized void reset () throws IOException [Inherited From FilterInputStream]
  Repositions this stream to the position at the time the mark method was last called on this input stream.
public void setMessageDigest (MessageDigest digest)
  Associates the specified message digest with this stream.
public long skip (long n) throws IOException [Inherited From FilterInputStream]
  Skips over and discards n bytes of data from this input stream.
public String toString ()
Prints a string representation of this digest input stream and its associated message digest object.
Fields
Hide/Show inherited fields
protected MessageDigest digest
The message digest associated with this stream.
protectedvolatile InputStream in [Inherited From FilterInputStream]
The input stream to be filtered.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar