Package stallone.io

Examples of stallone.io.CachedAsciiFileReader


        return(res);
    }

    public String[] readLines(String fileName) throws IOException
    {
        CachedAsciiFileReader reader = ioNew.asciiReader(fileName);
        reader.scan();

        int nlines = reader.getNumberOfLines();
        String[] res = new String[nlines];
        for (int i=0; i<res.length; i++)
            res[i] = reader.getLine(i);
        return res;
    }
View Full Code Here


*/
public class IOFactory
{
    public CachedAsciiFileReader asciiReader(String file) throws FileNotFoundException, IOException
    {
        CachedAsciiFileReader reader = new CachedAsciiFileReader(file);
        reader.scan();
        return reader;
    }
View Full Code Here

    public IIntSequenceLoader intSequenceLoader(List<String> files)
            throws IOException
    {
        // test first file
        String firstFile = files.get(0);
        CachedAsciiFileReader firstReader = IO.create.asciiReader(firstFile);
        String[] words = Strings.util.split(firstReader.getLine(0));
        IIntReader sequenceLoader;
        if (words.length == 1)
        {
            sequenceLoader = new IntSequenceReaderAsciiDense();
        }
View Full Code Here

TOP

Related Classes of stallone.io.CachedAsciiFileReader

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.