Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localize with BufferedReader?

In Java 11 BufferedReader documentation I have found following sentence:

Programs that use DataInputStreams for textual input can be localized by replacing each DataInputStream with an appropriate BufferedReader.

I cannot find any explanation how it can be done - what would be an appropriate buffered reader in this context?

like image 528
Line Avatar asked Feb 13 '21 09:02

Line


People also ask

How does BufferedReader readLine work?

BufferedReader readLine() method in Java with Examples The readLine() method of BufferedReader class in Java is used to read one line text at a time. The end of a line is to be understood by '\n' or '\r' or EOF. Parameters: This method does not accept any parameter.

What is BufferedReader in Java with example?

The BufferedReader class of Java is used to read the stream of characters from the specified source (character-input stream). The constructor of this class accepts an InputStream object as a parameter.


Video Answer


1 Answers

Yes, it's a really bizarre (I'd say broken) use of the term 'localization' here - it's making an obscure (in that it doesn't link to it) reference to DataInputStream's known-broken readLine method, especially considering that this method's javadoc explicitly refers to BufferedReader. I assume that line was added at the same time as the 'can be used to localize' line was added to BR's javadoc.

like image 179
rzwitserloot Avatar answered Oct 23 '22 06:10

rzwitserloot