public class DataTextObjectWithDelimiter extends CSVParser
autoCorrectBadQuotes, dateFormatddMMyy, dateFormatddMMyyyy, dateFormatyyyyMMdd, DEFAULT_DELIMITER, defaultFormat, delimiter, fields, timeFormatHHmmss
Constructor and Description |
---|
DataTextObjectWithDelimiter(java.io.BufferedReader bure) |
DataTextObjectWithDelimiter(java.io.BufferedReader bure,
char delimiter) |
DataTextObjectWithDelimiter(java.io.BufferedReader bure,
char delimiter,
boolean carriageReturnNotNecessaryForNewLine) |
DataTextObjectWithDelimiter(java.lang.String textFileName)
Constructs an new data text object with the default delimiter ';'
|
DataTextObjectWithDelimiter(java.lang.String textFileName,
char delimiter)
Constructs an new data text object
|
DataTextObjectWithDelimiter(java.lang.String textFileName,
char delimiter,
java.nio.charset.Charset charset)
Constructs a new data text object
|
DataTextObjectWithDelimiter(java.lang.String textFileName,
java.nio.charset.Charset charset)
Constructs an new data text object
|
DataTextObjectWithDelimiter(java.lang.String textFileName,
char delimiter,
java.lang.String charsetName)
Constructs an new data text object
|
DataTextObjectWithDelimiter(java.lang.String textFileName,
char delimiter,
java.lang.String charsetName,
boolean carriageReturnNotNecessaryForNewLine) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the file.
|
void |
delete()
Delete the text file after closing it.
|
java.lang.String |
getOpenResultText()
Returns the open result text which is "" if everything is OK.
|
boolean |
nextRow()
Moves the pointer to the next line.
|
void |
openFile(java.io.BufferedReader bure) |
void |
openFile(java.io.BufferedReader bure,
boolean carriageReturnNotNecessaryForNewLine) |
void |
openFile(java.lang.String textFileName,
java.nio.charset.Charset charset)
Opens a new text file to read
|
void |
openFile(java.lang.String textFileName,
java.nio.charset.Charset charset,
boolean carriageReturnNotNecessaryForNewLine) |
void |
setAutoCorrectBadQuotes(boolean autoCorrectBadQuotes)
Whether or not bad quotes should automatically be corrected - will assume ";" starts new column.
|
getDate, getDouble, getFieldCount, getInt, getText, getTime, parseFields
public DataTextObjectWithDelimiter(java.lang.String textFileName)
textFileName
- the name of the file to openpublic DataTextObjectWithDelimiter(java.lang.String textFileName, char delimiter)
textFileName
- the name of the file to openpublic DataTextObjectWithDelimiter(java.lang.String textFileName, java.nio.charset.Charset charset)
textFileName
- the name of the file to opencharset
- the Charset to usepublic DataTextObjectWithDelimiter(java.lang.String textFileName, char delimiter, java.lang.String charsetName)
textFileName
- the name of the file to openencoding
- the encoding to usepublic DataTextObjectWithDelimiter(java.lang.String textFileName, char delimiter, java.lang.String charsetName, boolean carriageReturnNotNecessaryForNewLine)
public DataTextObjectWithDelimiter(java.io.BufferedReader bure)
public DataTextObjectWithDelimiter(java.io.BufferedReader bure, char delimiter)
public DataTextObjectWithDelimiter(java.io.BufferedReader bure, char delimiter, boolean carriageReturnNotNecessaryForNewLine)
public DataTextObjectWithDelimiter(java.lang.String textFileName, char delimiter, java.nio.charset.Charset charset)
textFileName
- the name of the file to opencharset
- the Charset to usepublic void setAutoCorrectBadQuotes(boolean autoCorrectBadQuotes)
autoCorrectBadQuotes
- whether or not bad quotes should automatically be correctedpublic void openFile(java.lang.String textFileName, java.nio.charset.Charset charset)
textFileName
- the name of the file to opencharset
- the Charset to usepublic void openFile(java.lang.String textFileName, java.nio.charset.Charset charset, boolean carriageReturnNotNecessaryForNewLine)
public void openFile(java.io.BufferedReader bure)
public void openFile(java.io.BufferedReader bure, boolean carriageReturnNotNecessaryForNewLine)
public java.lang.String getOpenResultText()
public boolean nextRow()
public void close()
public void delete()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de