File Examples
Some of these examples have been discussed in class. The rest will be.
- TestFileClass, from the book, illustrates the use of the
File class.
- WriteData, from the book, illustrates the use of
PrintWriter.
- ReadData, from the book, illustrates the use of
Scanner to read a text file.
- CopyFileByte, copies one file to another.
- CopyFileByteTwo, copies one file to another, using command line arguments to
main.
- WriteFile, uses
DataOutputStream.
- ReadFile, uses
DataInputStream and reads what WriteFile wrote.
- ReadWriteFile, to be discussed Monday.