API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.security. DigestOutputStream View Source
Author(s)
Benjamin Renaud
Since
Version
1.32 05/11/17
Serial
Hierarchy
 Object
      OutputStream
          FilterOutputStream
              DigestOutputStream
Implements
Subclasses
Description
public class DigestOutputStream
  A transparent stream that updates the associated message digest using the bits going through the stream.
Constructors
public DigestOutputStream (OutputStream stream, MessageDigest digest)
  Creates a digest output stream, using the specified output stream and message digest.
Methods
Hide/Show inherited methods
public void close () throws IOException [Inherited From FilterOutputStream]
  Closes this output stream and releases any system resources associated with the stream.
public void flush () throws IOException [Inherited From FilterOutputStream]
  Flushes this output stream and forces any buffered output bytes to be written out to the stream.
public MessageDigest getMessageDigest ()
  Returns the message digest associated with this stream.
public void on (boolean on)
  Turns the digest function on or off.
public void setMessageDigest (MessageDigest digest)
  Associates the specified message digest with this stream.
public String toString ()
Prints a string representation of this digest output stream and its associated message digest object.
public void write (byte[] b) throws IOException [Inherited From FilterOutputStream]
  Writes b.length bytes to this output stream.
public void write (byte[] b, int off, int len) throws IOException [Overrides FilterOutputStream]
  Updates the message digest (if the digest function is on) using the specified subarray, and in any case writes the subarray to the output stream.
public void write (int b) throws IOException [Overrides FilterOutputStream] [Specified in OutputStream]
  Updates the message digest (if the digest function is on) using the specified byte, and in any case writes the byte to the output stream.
Fields
Hide/Show inherited fields
protected MessageDigest digest
The message digest associated with this stream.
protected OutputStream out [Inherited From FilterOutputStream]
The underlying output stream to be filtered.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar