public class CSVUtil
extends java.lang.Object
| Constructor and Description |
|---|
CSVUtil(java.lang.String inputFileName) |
CSVUtil(java.lang.String inputFileName,
java.lang.String outputFileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendChanges() |
void |
close() |
int |
Count(int col,
java.lang.String value) |
java.lang.String |
CSVDataget(int i,
int j) |
void |
displayFile()
Display entire file
|
void |
duplicateFile()
Creates a copy of file loaded
|
void |
exportHTML()
Exports the file to HTML tabel
|
CSVData |
get(int i) |
CSVDataContainer |
getCSVDataContainer() |
int |
LinearFind(int col,
java.lang.String value) |
void |
loadFile() |
void |
merge(java.util.ArrayList<java.lang.String> filePaths,
int row,
java.lang.String newFile) |
void |
remove(int row) |
void |
sortAcending(int column) |
void |
sortDecending(int column) |
void |
writeChanges() |
public CSVUtil(java.lang.String inputFileName,
java.lang.String outputFileName)
throws java.io.IOException
java.io.IOExceptionpublic CSVUtil(java.lang.String inputFileName)
throws java.io.IOException
java.io.IOExceptionpublic void loadFile()
throws java.io.IOException
java.io.IOExceptionpublic void sortAcending(int column)
throws java.io.IOException
column - - column to sort rows byjava.io.IOException - - possibility from file readspublic void sortDecending(int column)
throws java.io.IOException
column - - column to sort rows byjava.io.IOException - - exception caused by file readpublic void remove(int row)
row - public void writeChanges()
throws java.io.IOException
java.io.IOExceptionpublic void appendChanges()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void displayFile()
throws java.io.IOException
java.io.IOException - - File read exceptionpublic void duplicateFile()
throws java.io.IOException
java.io.IOExceptionpublic void exportHTML()
throws java.io.IOException
java.io.IOExceptionpublic void merge(java.util.ArrayList<java.lang.String> filePaths,
int row,
java.lang.String newFile)
throws java.io.IOException
java.io.IOExceptionpublic int Count(int col,
java.lang.String value)
col - - column of the searched valuedvalue - - value to be searched for in the specified columnpublic int LinearFind(int col,
java.lang.String value)
col - - column of the searched valuevalue - - value to be searched forpublic CSVData get(int i)
i - - index of data element(row)public java.lang.String CSVDataget(int i,
int j)
i - - Row indexj - - Column indexpublic CSVDataContainer getCSVDataContainer()