RandomAccessFile.readLine

RandomAccessFile.readLine

Class Overview | Class Members | This Package | All Packages

Syntax
public final String readLine() throws IOException
Returns
the next line of text from this file.
Description
Reads the next line of text from this file. This method successively reads bytes from the file until it reaches the end of a line of text.

A line of text is terminated by a carriage-return character ('\r'), a newline character ('\n'), a carriage-return character immediately followed by a newline character, or the end of the input stream. The line-terminating character(s), if any, are included as part of the string returned.

This method blocks until a newline character is read, a carriage return and the byte following it are read (to see if it is a newline), the end of the stream is detected, or an exception is thrown.

Exceptions
IOException if an I/O error occurs.