O'Reilly logo

JavaFX 1.2 Application Development Cookbook by Vladimir Vivien

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

Saving data locally with the Storage API

Although your JavaFX applications are expected to be able to connect to remote servers in order to persist or retrieve data, it is, however, also desirable to have the ability to save data locally on the user's device. Say, for instance, you have deployed a game. You may want to facilitate your gamers to save game settings, scores, and states locally, without having to connect to a server. This recipe shows you how to use the Storage API of JavaFX to save data on local devices.

Getting ready

The concepts presented here rely on classes found in the Storage API located in the javafx.io package. Prior to using the API, it is advisable that you have a working understanding of the low-level Java IO API classes ...

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