code: public static <E extends Enum<E> & ByteEnum> E fromByte (Class<E> eclass, byte code)
      {
          for (E value : eclass.getEnumConstants()) {
              if (value.toByte() == code) {
                  return value;
              }
          }
          throw new IllegalArgumentException(eclass + " has no value with code " + code);
      }
docs: Returns the enum value with the specified code in the supplied enum class.
  
  @exception IllegalArgumentException thrown if the enum lacks a value that maps to the
  supplied code.