public void setData(int index, ByteBuffer data) {
        if (index >= 0) {
            while (this.data.size() <= index) {
                this.data.add(null);
            }
            this.data.set(index, data);
            setUpdateNeeded();
        } else {
            throw new IllegalArgumentException("index must be greater than or equal to 0.");
        }
    }
<code>setData</code> sets the data that makes up the image. This data
is packed into a single <code>ByteBuffer</code>.

@param data
           the data that contains the image information.
jme3-core/src/main/java/com/jme3/texture/Image.java