Examples of HdfFileWriter


Examples of edu.ucar.ral.nujan.hdf.HdfFileWriter

     */
    private static HdfFileWriter create(File path, boolean overwrite)
            throws IOException {
        int optFlag = overwrite ? HdfFileWriter.OPT_ALLOW_OVERWRITE : 0;

        HdfFileWriter hdf5file;
        try {
            hdf5file = new HdfFileWriter(path.toString(), optFlag);
        } catch (HdfException e) {
            throw new IOException(e);
        }

        return hdf5file;
View Full Code Here

Examples of edu.ucar.ral.nujan.hdf.HdfFileWriter



    public static void write(HDF5Group root, File path, boolean overwrite)
            throws IOException {
        HdfFileWriter writer = create(path, overwrite);

        Map<HDF5Dataset, HdfGroup> datasetRegistry = new HashMap<>();

        // Define group, attribute and datasets' table of content
        writeGroup(root, writer.getRootGroup(), datasetRegistry);

        // End define
        try {
            writer.endDefine();
        } catch (HdfException e) {
            throw new IOException(e);
        }

        // Write datasets' data
        writeDatasetsData(datasetRegistry);

        // Close
        try {
            writer.close();
        } catch (HdfException e) {
            throw new IOException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.