Package htsjdk.samtools.util

Examples of htsjdk.samtools.util.Md5CalculatingOutputStream


            out.close();
        }

        // Run the input file through the FifoBuffer and back into another file
        final Md5CalculatingInputStream in   = new Md5CalculatingInputStream(new FileInputStream(inputFile), null);
        final Md5CalculatingOutputStream out = new Md5CalculatingOutputStream(new FileOutputStream("/dev/null"), null);
        final PrintStream outStream = new PrintStream(out);
        final FifoBuffer buffer = new FifoBuffer(in, outStream);
        buffer.BUFFER_SIZE = 128 * 1024 * 1024;
        buffer.doWork();

        in.close();
        out.close();
        final String inputMd5  = in.md5();
        final String outputMd5 = out.md5();
        Assert.assertEquals(outputMd5, inputMd5, "MD5s do not match between input and output.");
        inputFile.delete();
    }
View Full Code Here

TOP

Related Classes of htsjdk.samtools.util.Md5CalculatingOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.