IllegalAccessException {
DynamicSerDeTypeBase keyType = this.getKeyType();
DynamicSerDeTypeBase valueType = this.getValueType();
assert(oi.getCategory() == ObjectInspector.Category.MAP);
MapObjectInspector moi = (MapObjectInspector)oi;
ObjectInspector koi = moi.getMapKeyObjectInspector();
ObjectInspector voi = moi.getMapValueObjectInspector();
Map<?,?> map = moi.getMap(o);
oprot.writeMapBegin(new TMap(keyType.getType(),valueType.getType(),map.size()));
for(Iterator i = map.entrySet().iterator(); i.hasNext(); ) {
Map.Entry it = (Map.Entry)i.next();
Object key = it.getKey();
Object value = it.getValue();