Package htsjdk.samtools.util
Class Md5CalculatingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- htsjdk.samtools.util.Md5CalculatingOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class Md5CalculatingOutputStream extends OutputStream
Class to generate an MD5 string for a file as it is being read
-
-
Constructor Summary
Constructors Constructor Description Md5CalculatingOutputStream(OutputStream os, File digestFile)Md5CalculatingOutputStream(OutputStream os, Path digestFile)Constructor that takes in the OutputStream that we are wrapping and creates the MD5 MessageDigest
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()Stringmd5()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
Md5CalculatingOutputStream
public Md5CalculatingOutputStream(OutputStream os, Path digestFile)
Constructor that takes in the OutputStream that we are wrapping and creates the MD5 MessageDigest
-
Md5CalculatingOutputStream
public Md5CalculatingOutputStream(OutputStream os, File digestFile)
-
-
Method Detail
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
md5
public String md5()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
-