Suppose you want to read a file that was not created by a Java program.
The file contains lines of 8-bit text, and the 8-bit encoding represents the local character set, as represented by the current default locale.
The lines are separated by newline characters.
Which strategy reads the file and produces Java strings?
readText()
method. readUTF()
method. readLine()
method. readLine()
method. readLine()
method. C.
For a file that contains only 8-bit text, use a reader.
By default, a reader interprets 8-bit text according to the current default locale.
Readers read their input character by character; to assemble the characters into lines of text, chain on a LineNumberReader and call its readLine()
method.