|
||||||||||
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.SignStream
This OutputStream signs everything written to it using the specified HashState and SignatureKey. Alternatively it will embed unsigned hashes of the data within the stream. In either case the embedded hashes or signatures should be verified with a VerifyStream object.
VerifyStream
Field Summary |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
SignStream(java.io.OutputStream out,
int blockSize,
SignatureKey key,
HashState fs)
Creates a new SignStream. |
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. |
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 SignStream(java.io.OutputStream out, int blockSize, SignatureKey key, HashState fs)
fs
and after each
approximately blockSize
bytes it inserts a signature of the
fingerprint into the underlying stream. It then writes the data to
out
.
If key
is null the fingerprints will be written unsigned
to the underlying stream.
Method Detail |
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 |