out.close();
    public static byte[] objectToByteBuffer(Object obj) throws Exception {        byte[] result=null;        synchronized(out_stream) {            out_stream.reset();            ObjectOutputStream out=new ObjectOutputStream(out_stream);            out.writeObject(obj);            result=out_stream.toByteArray();            out.close();        }        return result;    }