question: public void writeBinary ( final PacketOutputStream os ) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( baos ) ; oos . writeObject ( object ) ; os . write ( baos . toByteArray ( ) ) ; }
target:  Write data in binary format to buffer.