O'Reilly logo

Minecraft Mods Programming Absolute Beginner’s Guide by Rogers Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17. Read and Write Files

In This Chapter

Read bytes from a file into a program

Create a new file on your computer

Save an array of bytes to a file

Make changes to the data stored in a file

There are numerous ways to represent data on a computer. You already have worked with one by creating objects. An object includes data in the form of variables and references to objects. It also includes methods that use the data to accomplish tasks.

To work with other kinds of data, such as files on your hard drive and documents on a web server, you can use the classes of the java.io package. The io part of its name stands for input/output, and the classes are used to access a source of data, such as a hard drive, a DVD, or the computer’s memory. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required