Answer:
- What stream type is used with a byte-oriented input file?
- FileInputStream
- What stream type is used with a byte-oriented output file?
- FileOutputStream
Using File Objects with Stream Constructors
Some constructors for IO streams that connect to disk files
use a File object argument.
(Previously, examples used constructors with String arguments).
Here is a list of them:
FileInputStream(File file) throws IOException FileOutputStream(File file) throws IOException FileReader(File file) throws FileNotFoundException FileWriter(File file) throws FileNotFoundException
Here is some more of the file copy program, now with blanks to fill in the constructors:
Cut and paste from the following phrases:
inFile outFile
QUESTION 8:
Fill in the blanks.