|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.EntityListFile
public class EntityListFile
This class provides static methods to save a list of Entitys
to, and load a list of Entitys from a file.
| Constructor Summary | |
|---|---|
EntityListFile()
|
|
| Method Summary | |
|---|---|
static java.util.Vector<Entity> |
loadFrom(java.io.File file)
Load a list of Entitys from the given file. |
static void |
saveTo(java.io.File file,
java.util.ArrayList<Entity> list)
Save the Entitys in the list to the given file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EntityListFile()
| Method Detail |
|---|
public static void saveTo(java.io.File file,
java.util.ArrayList<Entity> list)
throws java.io.IOException
Entitys in the list to the given file. The
Entitys\" pilots, damage, ammo loads, ammo usage, and
other campaign-related information are retained but data specific to a
particular game is ignored.
file - - The current contents of the file will be discarded and all
Entitys in the list will be written to the
file.list - - a Vector containing Entitys
to be stored in a file.
java.io.IOException - is thrown on any error.
public static java.util.Vector<Entity> loadFrom(java.io.File file)
throws java.io.IOException
Entitys from the given file. The
Entitys\" pilots, damage, ammo loads, ammo usage, and
other campaign-related information are retained but data specific to a
particular game is ignored.
file - - the File to load from.
Vector containing Entitys loaded
from the file. This vector may be empty, but it will not be
null.
java.io.IOException - is thrown on any error.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||