Enum readEnum(TypeDescription typeDescription) throws Exception {
Integer index = new Integer(read_long());
Method fromInt = typeDescription.getZClass().getMethod("fromInt", new Class[] {int.class});
Enum result = (Enum)fromInt.invoke(null, new Object[]{index});
if(DEBUG) System.err.println("##### " + getClass().getName() + ".readEnum:" + result);
return result;
}