Examples of IDataWriter


Examples of stallone.api.datasequence.IDataWriter

    {
        if (!new File(IO.util.getDirectory(file)).exists())
            throw new FileNotFoundException("File "+file+" cannot be written. Check if path name is valid and file location is accessible.");

        String extension = IO.util.getExtension(file);
        IDataWriter writer = null;
        if (extension.equalsIgnoreCase("dcd"))
        {
            writer = new DcdWriter(file, size, dimension);
        }
        else if (extension.equalsIgnoreCase("xtc"))
View Full Code Here

Examples of stallone.api.datasequence.IDataWriter

    public void transform_file(String infile, ICoordinateTransform T, String outfile)
            throws IOException
    {
        IDataReader reader = dataNew.reader(infile);
        int N = reader.size();
        IDataWriter writer = dataNew.writer(outfile, N, T.dimension());
        if (writer instanceof AsciiDataSequenceWriter && fixedOutputPrecision)
            ((AsciiDataSequenceWriter)writer).setFixedPrecision(outputPrecisionPre, outputPrecisionPost);
        for (IDoubleArray X : reader)
            writer.add(T.transform(X));
        writer.close();
    }
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.