Bifalgorithm post · Computer science one · File Input
When should you use specialized classes for binary file input?
When should you use specialized classes for binary file input? (Computer science one · File Input) — "Using the Scanner class to do file input offers a more ab…
Ideas in this flowchart
- Using the Scanner class for file input
- Scanner provides a more abstract interaction with a file.
- Scanner uses a buffered input stream for better performance.
- Binary files can still be read with nextByte().
- For binary files, it is better to use a class that models and abstracts the underlying file.
- The java.awt.Image class can read and write image files.
- The JDK and other libraries provide classes for modeling many kinds of data.