public class TextFileReader
extends java.lang.Object
Constructor and Description |
---|
TextFileReader(java.io.BufferedReader bure) |
TextFileReader(java.io.BufferedReader bure,
boolean carriageReturnNotNecessaryForNewLine) |
TextFileReader(java.io.File file)
Constructs a new text file reader and opens the file as specified searching in the path.
|
TextFileReader(java.io.File file,
java.nio.charset.Charset charset)
Constructs a new text file reader and opens the file as specified searching in the path.
|
TextFileReader(java.io.File file,
java.nio.charset.Charset charset,
boolean carriageReturnNotNecessaryForNewLine)
Constructs a new text file reader and opens the file as specified searching in the path.
|
TextFileReader(java.io.InputStreamReader isr) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the text file reader.
|
java.lang.String |
getLine()
Return the line as previously read by nextLine().
|
boolean |
nextLine()
Reads the next line and buffers it to be fetched by getLine.
|
void |
setAutoCorrectBadQuotes(boolean autoCorrectBadQuotes)
Whether or not bad quotes should automatically be corrected - will assume ";" starts new column.
|
public TextFileReader(java.io.File file) throws java.io.FileNotFoundException
fileName
- the name of the file to usejava.io.FileNotFoundException
public TextFileReader(java.io.File file, java.nio.charset.Charset charset) throws java.io.FileNotFoundException
fileName
- the name of the file to usecharset
- the Charset to usejava.io.FileNotFoundException
public TextFileReader(java.io.File file, java.nio.charset.Charset charset, boolean carriageReturnNotNecessaryForNewLine) throws java.io.FileNotFoundException
fileName
- the name of the file to usecharset
- the Charset to usecarriageReturnNotNecessaryForNewLine
- whether or not carriage return (\r) is needed to declare a new linejava.io.FileNotFoundException
public TextFileReader(java.io.InputStreamReader isr)
public TextFileReader(java.io.BufferedReader bure)
public TextFileReader(java.io.BufferedReader bure, boolean carriageReturnNotNecessaryForNewLine)
public void setAutoCorrectBadQuotes(boolean autoCorrectBadQuotes)
autoCorrectBadQuotes
- whether or not bad quotes should automatically be correctedpublic boolean nextLine() throws java.io.IOException
java.io.IOException
public java.lang.String getLine()
nextLine()
public void close() throws java.io.IOException
java.io.IOException
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de