question: public static void write ( OutputStream stream , Object o ) throws Exception { ObjectOutputStream oos ; if ( ! ( stream instanceof BufferedOutputStream ) ) { stream = new BufferedOutputStream ( stream ) ; } oos = new ObjectOutputStream ( stream ) ; oos . writeObject ( o ) ; oos . flush ( ) ; oos . close ( ) ; }
target:  serializes the given object to the specified stream.