public T read(Unpacker pac, T to, boolean required) throws IOException,
            MessageTypeException {
        if (!required && pac.trySkipNil()) {
            return null;
        }

        int ordinal = pac.readInt();

		if (ordinal < entries.length) {
			return entries[ordinal];
		}

		if (!strict) {
			return null;
		}

		throw new MessageTypeException(new IllegalArgumentException("ordinal: "
				+ ordinal));

    }