public class TextDataReader
extends java.lang.Object
| Constructor and Description |
|---|
TextDataReader() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[][] |
readCSVData(java.io.File file,
char colDelim,
char stringDelim)
This is equivalent to
readDoubleData2D,
for reading strings. |
static java.lang.String[][] |
readCSVData(java.io.Reader input,
char colDelim,
char stringDelim)
Reads comma-separated values (CSV) from reader input, and
returns a 2D array of strings corresponding to the read data.
|
static java.lang.String[][] |
readCSVData(java.lang.String file,
char colDelim,
char stringDelim)
This is equivalent to
readDoubleData2D,
for reading strings. |
static java.lang.String[][] |
readCSVData(java.net.URL url,
char colDelim,
char stringDelim)
Connects to the URL referred to by the URL object url,
and calls
readCSVData to
obtain a matrix of strings from
the resource. |
static double[] |
readDoubleData(java.io.File file)
Opens the file referred to by the file object file,
and calls
readDoubleData to
obtain an array of double-precision values from
the file. |
static double[] |
readDoubleData(java.io.Reader input)
Reads an array of double-precision values from the
reader input.
|
static double[] |
readDoubleData(java.lang.String file)
Opens the file with name file,
and calls
readDoubleData to
obtain an array of double-precision values from
the file. |
static double[] |
readDoubleData(java.net.URL url)
Connects to the URL referred to by the URL object url,
and calls
readDoubleData to
obtain an array of double-precision values from
the resource. |
static double[][] |
readDoubleData2D(java.io.File file)
Opens the file referred to by the file object file,
and calls
readDoubleData2D to
obtain a matrix of double-precision values from
the file. |
static double[][] |
readDoubleData2D(java.io.Reader input)
Uses the reader input to obtain
a 2-dimensional array of double-precision values.
|
static double[][] |
readDoubleData2D(java.lang.String file)
Opens the file with name file,
and calls
readDoubleData2D to
obtain a matrix of double-precision values from
the file. |
static double[][] |
readDoubleData2D(java.net.URL url)
Connects to the URL referred to by the URL object url,
and calls
readDoubleData2D to
obtain a matrix of double-precision values from
the resource. |
static int[] |
readIntData(java.io.File file)
This is equivalent to
readDoubleData,
for reading integers. |
static int[] |
readIntData(java.io.Reader input)
This is equivalent to
readDoubleData,
for reading integers. |
static int[] |
readIntData(java.lang.String file)
This is equivalent to
readDoubleData,
for reading integers. |
static int[] |
readIntData(java.net.URL url)
Connects to the URL referred to by the URL object url,
and calls
readIntData to
obtain an array of integers from
the resource. |
static int[][] |
readIntData2D(java.io.File file)
This is equivalent to
readDoubleData2D,
for reading integers. |
static int[][] |
readIntData2D(java.io.Reader input)
This is equivalent to
readDoubleData2D,
for reading integers. |
static int[][] |
readIntData2D(java.lang.String file)
This is equivalent to
readDoubleData2D,
for reading integers. |
static int[][] |
readIntData2D(java.net.URL url)
Connects to the URL referred to by the URL object url,
and calls
readDoubleData to
obtain a matrix of integers from
the resource. |
static java.lang.String[] |
readStringData(java.io.File file)
This is equivalent to
readDoubleData,
for reading strings. |
static java.lang.String[] |
readStringData(java.io.Reader input)
Reads an array of strings from the
reader input.
|
static java.lang.String[] |
readStringData(java.lang.String file)
This is equivalent to
readDoubleData,
for reading strings. |
static java.lang.String[] |
readStringData(java.net.URL url)
Connects to the URL referred to by the URL object url,
and calls
readStringData to
obtain an array of integers from
the resource. |
public static double[] readDoubleData(java.io.Reader input)
throws java.io.IOException
input - the reader to obtain data from.java.io.IOException - if an I/O error occurs.public static double[] readDoubleData(java.net.URL url)
throws java.io.IOException
readDoubleData to
obtain an array of double-precision values from
the resource.url - the URL object representing the resource to read.java.io.IOException - if an I/O error occurs.public static double[] readDoubleData(java.io.File file)
throws java.io.IOException
readDoubleData to
obtain an array of double-precision values from
the file.file - the file object representing the file to read.java.io.IOException - if an I/O error occurs.public static double[] readDoubleData(java.lang.String file)
throws java.io.IOException
readDoubleData to
obtain an array of double-precision values from
the file.file - the name of the file to read.java.io.IOException - if an I/O error occurs.public static int[] readIntData(java.io.Reader input)
throws java.io.IOException
readDoubleData,
for reading integers.input - the reader to obtain data from.java.io.IOException - if an I/O error occurs.public static int[] readIntData(java.net.URL url)
throws java.io.IOException
readIntData to
obtain an array of integers from
the resource.url - the URL object representing the resource to read.java.io.IOException - if an I/O error occurs.public static int[] readIntData(java.io.File file)
throws java.io.IOException
readDoubleData,
for reading integers.file - the file object represented to file to read.java.io.IOException - if an I/O error occurs.public static int[] readIntData(java.lang.String file)
throws java.io.IOException
readDoubleData,
for reading integers.file - the name of the file to read.java.io.IOException - if an I/O error occurs.public static java.lang.String[] readStringData(java.io.Reader input)
throws java.io.IOException
input - the reader to obtain data from.java.io.IOException - if an I/O error occurs.public static java.lang.String[] readStringData(java.net.URL url)
throws java.io.IOException
readStringData to
obtain an array of integers from
the resource.url - the URL object representing the resource to read.java.io.IOException - if an I/O error occurs.public static java.lang.String[] readStringData(java.io.File file)
throws java.io.IOException
readDoubleData,
for reading strings.file - the file object represented to file to read.java.io.IOException - if an I/O error occurs.public static java.lang.String[] readStringData(java.lang.String file)
throws java.io.IOException
readDoubleData,
for reading strings.file - the name of the file to read.java.io.IOException - if an I/O error occurs.public static double[][] readDoubleData2D(java.io.Reader input)
throws java.io.IOException
input - the reader to obtain data from.java.io.IOException - if an I/O error occurs.public static double[][] readDoubleData2D(java.net.URL url)
throws java.io.IOException
readDoubleData2D to
obtain a matrix of double-precision values from
the resource.url - the URL object representing the resource to read.java.io.IOException - if an I/O error occurs.public static double[][] readDoubleData2D(java.io.File file)
throws java.io.IOException
readDoubleData2D to
obtain a matrix of double-precision values from
the file.file - the file object representing the file to read.java.io.IOException - if an I/O error occurs.public static double[][] readDoubleData2D(java.lang.String file)
throws java.io.IOException
readDoubleData2D to
obtain a matrix of double-precision values from
the file.file - the name of the file to read.java.io.IOException - if an I/O error occurs.public static int[][] readIntData2D(java.io.Reader input)
throws java.io.IOException
readDoubleData2D,
for reading integers.input - the reader to obtain data from.java.io.IOException - if an I/O error occurs.public static int[][] readIntData2D(java.net.URL url)
throws java.io.IOException
readDoubleData to
obtain a matrix of integers from
the resource.url - the URL object representing the resource to read.java.io.IOException - if an I/O error occurs.public static int[][] readIntData2D(java.io.File file)
throws java.io.IOException
readDoubleData2D,
for reading integers.file - the file object represented to file to read.java.io.IOException - if an I/O error occurs.public static int[][] readIntData2D(java.lang.String file)
throws java.io.IOException
readDoubleData2D,
for reading integers.file - the name of the file to read.java.io.IOException - if an I/O error occurs.public static java.lang.String[][] readCSVData(java.io.Reader input,
char colDelim,
char stringDelim)
throws java.io.IOException
"One","Two","Three"
1,2,3
"String with "" delimiter",n,m
This produces a matrix of strings with dimensions 3×3.
The first row contains the strings One, Two, and Three
while the second row contains the strings 1, 2, and 3.
The first column of the last row contains the string
String with " delimiter.input - the reader to obtain data from.colDelim - the column delimiter.stringDelim - the string delimiter.java.io.IOException - if an I/O error occurs.public static java.lang.String[][] readCSVData(java.net.URL url,
char colDelim,
char stringDelim)
throws java.io.IOException
readCSVData to
obtain a matrix of strings from
the resource.url - the URL object representing the resource to read.colDelim - the column delimiter.stringDelim - the string delimiter.java.io.IOException - if an I/O error occurs.public static java.lang.String[][] readCSVData(java.io.File file,
char colDelim,
char stringDelim)
throws java.io.IOException
readDoubleData2D,
for reading strings.file - the file object represented to file to read.colDelim - the column delimiter.stringDelim - the string delimiter.java.io.IOException - if an I/O error occurs.public static java.lang.String[][] readCSVData(java.lang.String file,
char colDelim,
char stringDelim)
throws java.io.IOException
readDoubleData2D,
for reading strings.file - the name of the file to read.colDelim - the column delimiter.stringDelim - the string delimiter.java.io.IOException - if an I/O error occurs.To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.