|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.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| 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 |
equals, 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
write in class java.io.FilterOutputStream
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.write in class java.io.FilterOutputStreamjava.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
flush in class java.io.FilterOutputStream
public void close()
throws java.io.IOException
close in class java.io.FilterOutputStreamjava.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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright (c) 1997-2001 Logi Ragnarsson - Distributed under the GPL