Package edu.sdsc.grid.io

Examples of edu.sdsc.grid.io.GeneralFileOutputStream


        }

        //Create the corresponding file and open it
        file.createNewFile();

    GeneralFileOutputStream fos = FileFactory.newFileOutputStream(file);

    // Read through a digest input stream that will work out the MD5
        DigestInputStream dis = null;

        try
        {
            dis = new DigestInputStream(is, MessageDigest.getInstance("MD5"));
        }
        // Should never happen
        catch (NoSuchAlgorithmException nsae)
        {
            log.warn("Caught NoSuchAlgorithmException", nsae);
        }

        Utils.bufferedCopy(dis, fos);
        fos.close();
        is.close();

        bitstream.setColumn("size_bytes", file.length());

        if (dis != null)
View Full Code Here


        }

        //Create the corresponding file and open it
        file.createNewFile();

    GeneralFileOutputStream fos = FileFactory.newFileOutputStream(file);

    // Read through a digest input stream that will work out the MD5
        DigestInputStream dis = null;

        try
        {
            dis = new DigestInputStream(is, MessageDigest.getInstance("MD5"));
        }
        // Should never happen
        catch (NoSuchAlgorithmException nsae)
        {
            log.warn("Caught NoSuchAlgorithmException", nsae);
        }

        Utils.bufferedCopy(dis, fos);
        fos.close();
        is.close();

        bitstream.setColumn("size_bytes", file.length());

        if (dis != null)
View Full Code Here

TOP

Related Classes of edu.sdsc.grid.io.GeneralFileOutputStream

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.