public class HFileCSV extends Object
| Constructor and Description |
|---|
HFileCSV(String file)
Open file for reading assuming comma for value separation.
|
HFileCSV(String file,
String option)
Open file for reading/writing.
|
HFileCSV(String file,
String option,
char delim)
Open a file to write/read data to/from a CSV file.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
Close the file if needed.
|
void |
doc()
Show online documentation.
|
char |
getQuotechar()
Get current quote character.
|
CSVReader |
read()
Read data as sheet.
|
void |
setQuotechar(char c)
Set a quote character.
|
boolean |
write(double[] p)
Write double 1D array into the CSV file.
|
boolean |
write(H1D p)
Write 1-D histograms (including errors) into the CSV file.
|
boolean |
write(int[] p)
Write double 1D array into the CSV file.
|
boolean |
write(P0D p)
Write 1D array into the CSV file.
|
boolean |
write(P0I p)
Write 1D array into the CSV file.
|
boolean |
write(P1D p)
Write 2D array into the CSV file.
|
boolean |
write(PND p)
Write N-dimensional array into CSV file.
|
boolean |
write(PNI p)
Write N-dimensional (integer) array into CSV file.
|
boolean |
write(String[] p)
Write double 1D array into the CSV file.
|
public HFileCSV(String file, String option, char delim)
If the file name starts from http or ftp, we assume it is located on the Web and will attempt to read it from URL.
file - File name. Can be located on URL if starts from http or ftp.option - Option to create the file. If "w" - write a file (or read)
file, if "r" only read created file.delim - separator of values. Default is "comma".public HFileCSV(String file)
file - File namepublic void setQuotechar(char c)
c - public char getQuotechar()
public boolean write(double[] p)
p - input arraypublic boolean write(int[] p)
p - input arraypublic boolean write(String[] p)
p - input arraypublic boolean write(P0I p)
p - input arraypublic boolean write(P0D p)
p - input arraypublic boolean write(PND p)
p - multidimensional arraypublic boolean write(PNI p)
p - multidimensional arraypublic boolean write(H1D p)
p - histogrampublic boolean write(P1D p)
p - input arraypublic CSVReader read()
public boolean close()
public void doc()
DMelt 2.0 © DataMelt by jWork.ORG