Package org.eclipse.net4j.util.io

# Klasse DigestWriter

java.lang.Object
java.io.Writer
java.io.FilterWriter
org.eclipse.net4j.util.io.DigestWriter

Alle implementierten Schnittstellen:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

public class DigestWriter extends FilterWriter

Seit:
  3.1
Autor:
  Eike Stepper

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`protected MessageDigest`
`digest`
The message digest associated with this stream.

### Von Klasse geerbte Felder java.io.FilterWriter

`out`

### Von Klasse geerbte Felder java.io.Writer

`lock`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`DigestWriter(Writer writer, MessageDigest digest)`
Creates a digest writer, using the specified writer and message digest.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`MessageDigest`
`getMessageDigest()`
Returns the message digest associated with this writer.
`void`
`on(boolean on)`
Turns the digest function on or off.
`void`
`setMessageDigest(MessageDigest digest)`
Associates the specified message digest with this writer.
`String`
`toString()`
Prints a string representation of this digest output stream and its associated message digest object.
`void`
`write(char[] cbuf, int off, int len)`
`void`
`write(int c)`
`void`
`write(String str, int off, int len)`

### Von Klasse geerbte Methoden java.io.FilterWriter

`close, flush`

### Von Klasse geerbte Methoden java.io.Writer

`append, append, append, nullWriter, write, write`

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Felddetails

### digest

protected MessageDigest digest
The message digest associated with this stream.

## Konstruktordetails

### DigestWriter

public DigestWriter(Writer writer, MessageDigest digest)
Creates a digest writer, using the specified writer and message digest.

Parameter:
  `writer` - the writer.
  `digest` - the message digest to associate with this writer.

## Methodendetails

### getMessageDigest

public MessageDigest getMessageDigest()
Returns the message digest associated with this writer.

Gibt zurück:
  the message digest associated with this writer.
Siehe auch:
  - `setMessageDigest(java.security.MessageDigest)`

### setMessageDigest

public void setMessageDigest(MessageDigest digest)
Associates the specified message digest with this writer.

Parameter:
  `digest` - the message digest to be associated with this writer.
Siehe auch:
  - `getMessageDigest()`

### write

public void write(int c) throws IOException

Setzt außer Kraft:
  `write` in Klasse `FilterWriter`
Löst aus:
  `IOException`

### write

public void write(char[] cbuf, int off, int len) throws IOException

Setzt außer Kraft:
  `write` in Klasse `FilterWriter`
Löst aus:
  `IOException`

### write

public void write(String str, int off, int len) throws IOException

Setzt außer Kraft:
  `write` in Klasse `FilterWriter`
Löst aus:
  `IOException`

### on

public void on(boolean on)
Turns the digest function on or off. The default is on. When it is on, a call to one of the `write` methods results in an update on the message digest. But when it is off, the message digest is not updated.

Parameter:
  `on` - true to turn the digest function on, false to turn it off.

### toString

public String toString()
Prints a string representation of this digest output stream and its associated message digest object.

Setzt außer Kraft:
  `toString` in Klasse `Object`