| java.lang.Object |
| ↳ |
com.google.gdata.util.common.io.LineReader |
Class Overview
A class for reading lines of text. Provides the same functionality
as readLine() but for all Readable
objects, not just instances of Reader.
Summary
| Fields |
|
private
final
char[] |
buf |
|
|
private
final
CharBuffer |
cbuf |
|
|
private
final
LineBuffer |
lineBuf |
|
|
private
final
Queue<String> |
lines |
|
|
private
final
Readable |
readable |
|
|
private
final
Reader |
reader |
|
| Public Constructors |
|
|
LineReader(Readable readable)
Creates a new instance that will read lines from the given
Readable object.
|
| Public Methods |
|
String
|
readLine()
Reads a line of text.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Fields
private
final
CharBuffer
cbuf
private
final
LineBuffer
lineBuf
private
final
Queue<String>
lines
private
final
Readable
readable
private
final
Reader
reader
Public Constructors
public
LineReader
(Readable readable)
Creates a new instance that will read lines from the given
Readable object.
Public Methods
public
String
readLine
()
Reads a line of text. A line is considered to be terminated by any
one of a line feed ('\n'), a carriage return
('\r'), or a carriage return followed immediately by a linefeed
("\r\n").
Returns
- a
String containing the contents of the line, not
including any line-termination characters, or null if the
end of the stream has been reached.
Throws
| IOException
| if an I/O error occurs
|