package com.uoc.educationalVG.framework;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import android.content.SharedPreferences;

/**
 * We want the easiest possible file-accessing mechanism.
 * 
 * We just specify a filename and get a stream in return. As we usually do in
 * Java, we will throw an IOException in case something goes wrong. Where we read
 * and write files from and to will depend on the implementation, of course.
 * Assets will be read from our application’s APK file, and files will be read
 * from and written to on the SD card (also known as external storage). The
 * returned InputStreams and OutputStreams are plain-old Java streams. Of
 * course, we have to close them once we are finished using them.
 * 
 * @author "Beginning Android 4 Games Development"
 * 
 */

public interface FileIO {
	public InputStream readAsset(String fileName) throws IOException;

	public InputStream readFile(String fileName) throws IOException;

	public OutputStream writeFile(String fileName) throws IOException;

	public SharedPreferences getPreferences();
}
