public static void writeObject ( Serializable toSave , OutputStream writeTo ) { try { ObjectOutputStream os = new ObjectOutputStream ( writeTo ) ; os . writeObject ( toSave ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Writes the object to the output stream THIS DOES NOT FLUSH THE STREAM