Class AnimationUtility

java.lang.Object
  extended by AnimationUtility

public class AnimationUtility
extends java.lang.Object

A helper class that loads animations from a file or saves them to one.


Constructor Summary
AnimationUtility()
           
 
Method Summary
static java.lang.String getLastError()
          Get the last error that occured while writing
static java.util.ArrayList<Animation> readFile(java.lang.String path)
          Read a file, return ArrayList with all animations in the file.
static void writeFile(java.lang.String path, java.util.ArrayList<Animation> animations)
          Write a file with all Animations of an ArrayList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationUtility

public AnimationUtility()
Method Detail

readFile

public static java.util.ArrayList<Animation> readFile(java.lang.String path)
                                               throws java.lang.Exception
Read a file, return ArrayList with all animations in the file.

Parameters:
path - Path of file
Returns:
Populated ArrayList
Throws:
Excpetion - When something goes wrong with the Scanner...
java.lang.Exception

writeFile

public static void writeFile(java.lang.String path,
                             java.util.ArrayList<Animation> animations)
Write a file with all Animations of an ArrayList

Parameters:
path - Path to write to
animations - ArrayList with all animations to be saved
See Also:
getLastError()

getLastError

public static java.lang.String getLastError()
Get the last error that occured while writing

Returns:
Text of the exception that occured
See Also:
writeFile()