javadoc.com.google.common.io.LineReader.html Maven / Gradle / Ivy
The newest version!
LineReader (Guava: Google Core Libraries for Java 11.0.1 API)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
com.google.common.io
Class LineReader
java.lang.Object
com.google.common.io.LineReader
@Beta
public final class LineReader
- extends Object
A class for reading lines of text. Provides the same functionality
as BufferedReader.readLine()
but for all Readable
objects, not just instances of Reader
.
- Since:
- 1.0
- Author:
- Chris Nokleberg
Constructor Summary | |
---|---|
LineReader(Readable readable)
Creates a new instance that will read lines from the given Readable object. |
Method Summary | |
---|---|
String |
readLine()
Reads a line of text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
LineReader
public LineReader(Readable readable)
- Creates a new instance that will read lines from the given
Readable
object.
Method Detail |
---|
readLine
public String readLine() throws IOException
- 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, ornull
if the end of the stream has been reached. - Throws:
IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010-2012. All Rights Reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy