Persistent file storage is an important feature of many games. Perhaps the simplest case is writing and reading to a file to record high score data or perhaps having the levels of your game stored in a separate file that can be easily updated for new maps and creatures. BREW's flexible file I/O system allows several different kinds of persistent storage. First, there are traditional files. These can contain any kind of data-it is up to the applet to interpret it. Second, there are database files, which are simple databases that are read and written to from within BREW. Finally, there are applet preferences that are small chunks of data that belong to the applet. These are typically used to save simple user preferences and other very small chunks of data. This chapter will focus on all three, showing how you can use persistent storage for a variety of purposes.