The document contains code for reading and writing files in Java. It includes methods to write a text file by writing each book object's attributes on a new line, read a text file line by line and print each line, write a binary file by writing each book object using object output stream, and read a binary file by reading each serialized book object and adding it to a list.
The document contains code for reading and writing files in Java. It includes methods to write a text file by writing each book object's attributes on a new line, read a text file line by line and print each line, write a binary file by writing each book object using object output stream, and read a binary file by reading each serialized book object and adding it to a list.
The document contains code for reading and writing files in Java. It includes methods to write a text file by writing each book object's attributes on a new line, read a text file line by line and print each line, write a binary file by writing each book object using object output stream, and read a binary file by reading each serialized book object and adding it to a list.