jsci.io
Class TextReader

java.lang.Object
  extended by jsci.io.TextReader

public class TextReader
extends java.lang.Object


Constructor Summary
TextReader(java.io.File file)
           
TextReader(java.io.Reader reader)
           
TextReader(java.lang.String name)
           
 
Method Summary
 void close()
           
 java.lang.String getDelimiter()
           
 java.text.NumberFormat getFormat()
           
 void read(DoubleArray2D array)
           
 double[][] readArray()
          Reads data to an array.
 double readDouble(java.lang.String str)
           
 int readInt(java.lang.String str)
           
 java.lang.String readLine()
           
 double[] readRow(java.lang.String line)
           
 void readTable(DoubleArray2D array)
           
 void setDelimiter(java.lang.String s)
           
 void setFormat(java.text.NumberFormat format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextReader

public TextReader(java.io.Reader reader)

TextReader

public TextReader(java.lang.String name)
           throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

TextReader

public TextReader(java.io.File file)
           throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

setDelimiter

public void setDelimiter(java.lang.String s)

getDelimiter

public java.lang.String getDelimiter()

setFormat

public void setFormat(java.text.NumberFormat format)

getFormat

public java.text.NumberFormat getFormat()

readDouble

public double readDouble(java.lang.String str)
                  throws java.io.IOException,
                         java.text.ParseException
Throws:
java.io.IOException
java.text.ParseException

readInt

public int readInt(java.lang.String str)

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Throws:
java.io.IOException

readRow

public double[] readRow(java.lang.String line)
                 throws java.io.IOException,
                        java.text.ParseException
Throws:
java.io.IOException
java.text.ParseException

readArray

public double[][] readArray()
                     throws java.io.IOException,
                            java.text.ParseException
Reads data to an array.

Throws:
java.io.IOException - If an I/O error occurs.
java.text.ParseException

read

public void read(DoubleArray2D array)
          throws java.io.IOException,
                 java.text.ParseException
Throws:
java.io.IOException
java.text.ParseException

readTable

public void readTable(DoubleArray2D array)
               throws java.io.IOException,
                      java.text.ParseException
Throws:
java.io.IOException
java.text.ParseException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException