question: public static void putObjectToStream ( Object obj , OutputStream os ) throws IOException { ObjectOutputStream oos = new ObjectOutputStream ( os ) ; oos . writeObject ( obj ) ; oos . flush ( ) ; oos . close ( ) ; }
target:  Serializes specified object to an output stream.