|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.logi.crypto.io.HashOutputStream
This OutputStream hashes everything written to it and then passes it to an underlying OutputStream. The hash can be retrieved by calling getFingerprint().
HashInputStream| Field Summary |
| Fields inherited from class java.io.FilterOutputStream |
out |
| Constructor Summary | |
HashOutputStream(java.io.OutputStream out)
Creates a new HashOutputStream around out. |
|
HashOutputStream(java.io.OutputStream out,
HashState hashState)
Creates a new HashOutputStream around out. |
|
| Method Summary | |
void |
close()
Closes this output stream and releases any system resources associated with this stream. |
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out to the stream. |
Fingerprint |
getFingerprint()
Return a fingerprint of all data written so far. |
void |
write(byte[] buf,
int off,
int len)
Writes len bytes from the specified byte array starting
at offset off to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream. |
| Methods inherited from class java.io.FilterOutputStream |
write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HashOutputStream(java.io.OutputStream out,
HashState hashState)
out. hashState will be used to
calculate fingerprints.
public HashOutputStream(java.io.OutputStream out)
out. A new
SHA1State object will be used to calculate fingerprints.
SHA1State| Method Detail |
public Fingerprint getFingerprint()
public void write(int b)
throws java.io.IOException
java.io.IOException
public void write(byte[] buf,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array starting
at offset off to this output stream.
java.io.IOException - if there is a problem iwth the underlying stream
or the key fails to sign the fingerprint.
public void flush()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException - if there is a problem with the underlying stream
or the key fails to sign the fingerprint.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||