private void addFrame(byte[] imgData, int rate, int jiffy, int width, int height, int numSeq) throws IOException {
            BufferedImage bi[] = parseICOImage(imgData);
            int hotspotx = 0;
            int hotspoty = 0;
            int type = imgData[2] | imgData[3];
            if (type == 2) {
                // CUR type, hotspot might be stored.
                hotspotx = imgData[10] | imgData[11];
                hotspoty = imgData[12] | imgData[13];
            } else if (type == 1) {
                // ICO type, hotspot not stored. Put at 0, height - 1
                // because it's flipped.
                hotspotx = 0;
                hotspoty = height - 1;
            }
//            System.out.println("Image type = " + (type == 1 ? "CUR" : "ICO"));
            if (rate == 0) {
                rate = jiffy;
            }
            CursorLoader.CursorImageData cid = new CursorLoader.CursorImageData(bi, rate, hotspotx, hotspoty, type);
            if (width == 0) {
                this.width = cid.width;
            } else {
                this.width = width;
            }
            if (height == 0) {
                this.height = cid.height;
            } else {
                this.height = height;
            }
            if (data == null) {
                if (numSeq > numImages) {
                    data = BufferUtils.createIntBuffer(this.width * this.height * numSeq);
                } else {
                    data = BufferUtils.createIntBuffer(this.width * this.height * numImages);
                }
                data.put(cid.data);
            } else {
                data.put(cid.data);
            }
            if (imgDelay == null && (numImages > 1 || numSeq > 1)) {
                if (numSeq > numImages) {
                    imgDelay = BufferUtils.createIntBuffer(numSeq);
                } else {
                    imgDelay = BufferUtils.createIntBuffer(numImages);
                }
                imgDelay.put(cid.imgDelay);
            } else if (imgDelay != null) {
                imgDelay.put(cid.imgDelay);
            }
            xHotSpot = cid.xHotSpot;
            yHotSpot = cid.yHotSpot;
            cid = null;
        }
Loads and return a cursor file of one of the following format: .ani, .cur and .ico.
@param info The {@link AssetInfo} describing the cursor file.
@return A JmeCursor representation of the LWJGL's Cursor.
@throws IOException if the file is not found.
jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java