Stratego/src/util/FileUtil.java
public static boolean serializeObject(Object o, String file)
	{
		try
		{
			FileOutputStream fos = new FileOutputStream(file);
			ObjectOutputStream oos = new ObjectOutputStream(fos);
			
			oos.writeObject(o);
			
			fos.close();
			oos.close();
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
			return false;
		}
		catch (IOException e)
		{
			e.printStackTrace();
			return false;
		}
		return true;
	}
/**
	 * Serializes a Object into a file
	 * 
	 * @param o Object to be serialized
	 * @param file File output
	 * @return true if successful
	 */
Serializes a Object into a file

@param o Object to be serialized
@param file File output
@return true if successful
Serializes a Object into a file @param o Object to be serialized @param file File output @return true if successful
public static boolean serializeObject(Object o, String file)
	{
		try
		{
			FileOutputStream fos = new FileOutputStream(file);
			ObjectOutputStream oos = new ObjectOutputStream(fos);
			oos.writeObject(o);
			fos.close();
			oos.close();
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
			return false;
		}
		catch (IOException e)
		{
			e.printStackTrace();
			return false;
		}
		return true;
	}
public static boolean serializeObject ( Object o , String file ) { try { FileOutputStream fos = new FileOutputStream ( file ) ; ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; oos . writeObject ( o ) ; fos . close ( ) ; oos . close ( ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; return false ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } return true ; }
Serializes a Object into a file
Serializes a Object into a file