public static UnsignedBytes forValue(final long value) {
        if (value < 0) {
            throw new IllegalArgumentException("Negative values are not allowed");
        } else if (value == 0) {
            return ZERO;
        }

        for (int i = 1; i < INSTANCES.length; i++) {
            final UnsignedBytes unsignedBytes = INSTANCES[i];
            if (unsignedBytes.maxValue() >= value) {
                return unsignedBytes;
            }
        }

        throw new IllegalArgumentException("Unable to find appropriate unsigned bytes size");
    }
Each instance provides methods for working with unsigned longs that are written
to len bytes. The maximum numeric value of the unsigned value will be governed
by len, e.g for len == 1, the range of values are 0-255.
stroom-lmdb/src/main/java/stroom/lmdb/serde/UnsignedBytesInstances.java