code: static void colorKeyCursor(byte[] source,
                                        Buffer dest,
                                        int targetDepth,
                                        int transparentPixel) {
          switch (targetDepth) {
              case 32:
                  colorKeyCursor32(source,
                                   (IntBuffer) dest, transparentPixel);
                  break;
              case 16:
                  colorKeyCursor16(source,
                                   (ShortBuffer) dest, transparentPixel);
                  break;
              default:
                  throw new UnsupportedOperationException();
          }
      }
docs: Convert a cursor in 32-bit BYTE_ARGB_PRE format to a 16-bit or 32-bit
  color-keyed format
  
  @param source the cursor pixels
  @param dest a target ShortBuffer or IntBuffer
  @param targetDepth the depth of the target format (16 or 32)
  @param transparentPixel the color key used for transparent pixels