public class CompressingDigestOutputWriter
extends java.io.OutputStream
Constructor and Description |
---|
CompressingDigestOutputWriter(java.io.OutputStream stream,
java.lang.String checksumAlgo) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close stream
|
void |
flush()
flush stream
|
java.lang.String |
getCompressedChecksum() |
java.lang.String |
getUncompressedChecksum() |
void |
write(byte[] b)
write stream with byte
|
void |
write(int arg0)
write stream
|
public CompressingDigestOutputWriter(java.io.OutputStream stream, java.lang.String checksumAlgo) throws java.security.NoSuchAlgorithmException, java.io.IOException
stream
- The stream to compresschecksumAlgo
- checksum algorithmjava.security.NoSuchAlgorithmException
- nosuchalgorithmexceptionjava.io.IOException
- ioexceptionpublic void write(int arg0) throws java.io.IOException
write
in class java.io.OutputStream
arg0
- int argjava.io.IOException
- ioexceptionpublic void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
b
- bytejava.io.IOException
- ioexceptionpublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- ioexceptionpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
- ioexceptionpublic java.lang.String getUncompressedChecksum()
public java.lang.String getCompressedChecksum()