ArrayList v = new ArrayList();
// Gather the data
MyData u1 = new MyData("Ian Darwin", "secret_java_cook");
v.add(new Date());
v.add(u1);
v.add(new MyData("Abby Brant", "dujordian"));
write(v);
// Save the data to disk.
ObjectOutputStream os = new ObjectOutputStream(
new BufferedOutputStream(
new FileOutputStream(FILENAME)));
os.writeObject(theGraph);
os.close();