private int readMultiByteInteger(final InputStream is) throws ImagingException, IOException {
        int value = 0;
        int nextByte;
        int totalBits = 0;
        do {
            nextByte = readByte("Header", is, "Error reading WBMP header");
            value <<= 7;
            value |= nextByte & 0x7f;
            totalBits += 7;
            if (totalBits > 31) {
                throw new ImagingException("Overflow reading WBMP multi-byte field");
            }
        } while ((nextByte & 0x80) != 0);
        return value;
    }
Constructs a new instance with the big-endian byte order.
src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java