final Class<EnumMap<? extends Enum<?>, ?>> type) {
kryo.reference(FAKE_REFERENCE);
final EnumMap<? extends Enum<?>, ?> result = create(kryo, input, type);
final Class<Enum<?>> keyType = getKeyType( result );
final Enum<?>[] enumConstants = keyType.getEnumConstants();
final EnumMap rawResult = result;
final int size = input.readInt(true);
for ( int i = 0; i < size; i++ ) {
final int ordinal = input.readInt(true);
final Enum<?> key = enumConstants[ordinal];
final Object value = kryo.readClassAndObject( input );
rawResult.put( key, value );
}
return result;
}