private static int readPixel(ByteBuffer buf, int idx, int bpp){
        buf.position(idx);
        int original = buf.get() & 0xff;
        while ((--bpp) > 0){
            original = (original << 8) | (buf.get() & 0xff);
        }
        return original;
    }
A private constructor to inhibit instantiation of this class.
jme3-desktop/src/main/java/jme3tools/converters/ImageToAwt.java