December 2011
Beginner
693 pages
19h 56m
English
The original FileIO interface was lean and mean. It contained four methods: one to get an InputStream for an asset, another to get an InputStream for a file in the external storage, a third that returned an OutputStream for a file on the external storage device, and a final one that got the SharedPreferences for the game. In Chapter 4, you learned how to open assets and files on the external storage using Android APIs. Listing 5–1 presents the implementation of the FileIO interface, based on knowledge from Chapter 4.
Listing 5–1. AndroidFileIO.java; Implementing the FileIO Interface
package com.badlogic.androidgames.framework.impl;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream; ...Read now
Unlock full access