java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
gnu.javax.net.ssl.provider.DigestOutputStream
- final class DigestOutputStream
- extends java.io.FilterOutputStream
Method Summary |
(package private) void |
setDigesting(boolean digesting)
|
void |
write(byte[] buf)
This method writes all the bytes in the specified array to the underlying
OutputStream . |
void |
write(byte[] buf,
int off,
int len)
This method calls the write(int) method len
times for all bytes from the array buf starting at index
offset . |
void |
write(int b)
This method writes a single byte of output to the underlying
OutputStream . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
md5
private gnu.java.security.hash.IMessageDigest md5
sha
private gnu.java.security.hash.IMessageDigest sha
digesting
private boolean digesting
DigestOutputStream
DigestOutputStream(java.io.OutputStream out,
gnu.java.security.hash.IMessageDigest md5,
gnu.java.security.hash.IMessageDigest sha)
setDigesting
void setDigesting(boolean digesting)
write
public void write(int b)
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method writes a single byte of output to the underlying
OutputStream
.
write
public void write(byte[] buf)
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method writes all the bytes in the specified array to the underlying
OutputStream
. It does this by calling the three parameter
version of this method - write(byte[], int, int)
in this
class instead of writing to the underlying OutputStream
directly. This allows most subclasses to avoid overriding this method.
write
public void write(byte[] buf,
int off,
int len)
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method calls the
write(int)
method len
times for all bytes from the array buf
starting at index
offset
. Subclasses should overwrite this method to get a
more efficient implementation.