java - Scanner vs. BufferedReader -
as far know, 2 common methods of reading character-based data file in java using scanner
or bufferedreader
. know bufferedreader
read files efficiently using buffer avoid physical disk operations. questions are:
- does
scanner
performsbufferedreader
? - why choose
scanner
onbufferedreader
or vice versa?
scanner
used parsing tokens contents of stream while bufferedreader
reads stream , not special parsing.
in fact can pass bufferedreader
scanner
source of characters parse.
Comments
Post a Comment