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?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With