Top Description Fields Constructors Methods
com.opencsv.stream.reader

public Class LineReader

extends Object
Class Inheritance
Imports
com.opencsv.ICSVParser, java.io.BufferedReader, .IOException

This class was created for issue #106 where carriage returns were being removed. This class allows the user to determine if they wish to keep or remove them from the data being read.
Author
Scott Conway
Since
3.3

Field Summary

Modifier and TypeField and Description
private final boolean
private final BufferedReader

Constructor Summary

AccessConstructor and Description
public
LineReader(BufferedReader
Reader that data will be read from.
reader
,
boolean
True if carriage returns should remain in the data, false to remove them.
keepCarriageReturns
)

LineReader constructor.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

Line read from reader.
readLine
()

Reads the next line from the Reader.

private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keepCarriageReturnsback to summary
private final boolean keepCarriageReturns
readerback to summary
private final BufferedReader reader

Constructor Detail

LineReaderback to summary
public LineReader(BufferedReader reader, boolean keepCarriageReturns)

LineReader constructor.

Parameters
reader:BufferedReader

Reader that data will be read from.

keepCarriageReturns:boolean

True if carriage returns should remain in the data, false to remove them.

Method Detail

readLineback to summary
public String readLine() throws IOException

Reads the next line from the Reader.

Returns:String

Line read from reader.

Exceptions
IOException:
On error from BufferedReader
readUntilNewlineback to summary
private String readUntilNewline() throws IOException