How to localize with BufferedReader?
Asked Answered
D

1

5

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?

Dogtooth answered 13/2, 2021 at 9:25 Comment(2)
Just a guess: I looked at DataInputStream.readLine and found that it doesn't convert bytes to characters properly. "Localised" here could just mean "handles Unicode properly". I don't think the word "appropriate" is that important here. It just refers to a buffered reader that reads from the DataInputStreamLavellelaven
Please find those links which could help you Link_1, Link_2Uzia
N
6

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.

Nonperishable answered 13/2, 2021 at 9:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.