DataOutputBuffer dob = new DataOutputBuffer();
dob.writeUTF(methodName);
dob.writeInt(1);
Scan scan = new Scan();
HbaseObjectWritable.writeObject(dob, scan, Scan.class, new Configuration());
dob.writeUTF("org.apache.hadoop.hbase.client.Scan");
Bytes.writeByteArray(dob, new byte[]{'a'});
// this is the dynamic protocol name
dob.writeUTF(protocolName);
DataInputBuffer dib = new DataInputBuffer();