Documentation of 'org.jlab.groot.io.TextFileReader' Java class
TextFileReader
org.jlab.groot.io

Class TextFileReader



  • public class TextFileReader
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      TextFileReader() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double[] getAsDouble(int[] index)
      Returns specified columns as array of double
      double[] getAsDouble(int min, int max) 
      int[] getAsInt(int[] index)
      returns specified columns as array of ints
      int[] getAsInt(int min, int max)
      returns array of ints for given range of columns.
      int getDataSize() 
      static void main(java.lang.String[] args) 
      boolean openFile(java.lang.String name)
      Open a text file for reading.
      boolean readNext()
      reads the next line in the file and populates the internal list of tokens
      void show() 
      java.lang.String toString()
      returns string representation of the array that was read.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TextFileReader

        public TextFileReader()
    • Method Detail

      • openFile

        public boolean openFile(java.lang.String name)
        Open a text file for reading.
        Parameters:
        name - name of the file
        Returns:
      • readNext

        public boolean readNext()
        reads the next line in the file and populates the internal list of tokens
        Returns:
        true if read was successful, false otherwise.
      • getDataSize

        public int getDataSize()
      • getAsDouble

        public double[] getAsDouble(int min,
                                    int max)
      • getAsDouble

        public double[] getAsDouble(int[] index)
        Returns specified columns as array of double
        Parameters:
        index - array containing columns indices
        Returns:
      • getAsInt

        public int[] getAsInt(int min,
                              int max)
        returns array of ints for given range of columns.
        Parameters:
        min - min number of column
        max - max number of column
        Returns:
      • getAsInt

        public int[] getAsInt(int[] index)
        returns specified columns as array of ints
        Parameters:
        index - array containing columns indices
        Returns:
      • toString

        public java.lang.String toString()
        returns string representation of the array that was read.
        Overrides:
        toString in class java.lang.Object
        Returns:
      • show

        public void show()
      • main

        public static void main(java.lang.String[] args)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.