Search code examples
javabufferedreaderreader

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?


Solution

  • 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.