package org.usfirst.frc2832.Robot_2016.HID;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;

/**
 * Utility class to save and load many gamepad states at once
 * /home/lvuser/autondata/FILENAME is where we should save them
 */
public class SavedStates {
	/**
	 * This saves the file
	 * @param states Some states
	 */
	public static void save(ArrayList<GamepadState> states, String path) {
		try {
			FileOutputStream fo = new FileOutputStream(path);
			ObjectOutputStream oi = new ObjectOutputStream(fo);
			
			oi.writeObject(states);
			
			oi.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static ArrayList<GamepadState> load(String path) {
		Object result = null;
		try {
			FileInputStream fi = new FileInputStream(path);
			ObjectInputStream oi = new ObjectInputStream(fi);
			
			result = oi.readObject();
			
			oi.close();
		} catch (IOException | ClassNotFoundException e) {
			e.printStackTrace();
		}
		
		if (result instanceof ArrayList)
			return ((ArrayList<GamepadState>) result);
		
		return (null);
	}
}

@@ -312,102 +312,690 @@
 %0D%0A *
- /home/lvuser/autondata/FILENAME is where we should save them%0D%0A
+/%0D%0Apublic class SavedStates %7B%0D%0A%09%0D%0A%09private static String convertNameToPath(String name) %7B%0D%0A%09%09return (%22/home/lvuser/autondata/%22 + name + %22.dat%22);%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Saves an ArrayList of GamepadStates to a file.%0D%0A%09 * @param states%0D%0A%09 * @param name The name of the file, not including path or extension%0D%0A%09 */%0D%0A%09public static void save(ArrayList%3CGamepadState%3E states, String name) %7B%0D%0A%09%09saveFile(states, convertNameToPath(name));%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Loads an ArrayList of GamepadStates from a file.%0D%0A%09 * @param name The name of the file, not including path or extension%0D%0A%09
  */%0D%0A
+%09
 public 
-class SavedStates %7B
+static ArrayList%3CGamepadState%3E load(String name) %7B%0D%0A%09%09return (loadFile(convertNameToPath(name)));%0D%0A%09%7D%0D%0A%09
 %0D%0A%09/
@@ -1054,37 +1054,40 @@
 states%0D%0A%09 */%0D%0A%09p
-ublic
+rotected
  static void sav
@@ -1079,32 +1079,36 @@
 static void save
+File
 (ArrayList%3CGamep
@@ -1377,29 +1377,32 @@
 %7D%0D%0A%09%7D%0D%0A%09%0D%0A%09p
-ublic
+rotected
  static Arra
@@ -1417,32 +1417,36 @@
 mepadState%3E load
+File
 (String path) %7B%0D

Add more utility methods