Blame SOURCES/libwebp_jni_example.java

29f79b
import com.google.webp.libwebp;
29f79b
29f79b
import java.lang.reflect.Method;
29f79b
29f79b
public class libwebp_jni_example {
29f79b
  static {
29f79b
    try {
29f79b
      System.load("/usr/lib64/libwebp-java/libwebp_jni.so");
29f79b
    } catch (UnsatisfiedLinkError e) {
29f79b
      System.load("/usr/lib/libwebp-java/libwebp_jni.so");
29f79b
    }
29f79b
  }
29f79b
29f79b
  /**
29f79b
   * usage: java -cp libwebp.jar:. libwebp_jni_example
29f79b
   */
29f79b
  public static void main(String argv[]) {
29f79b
    final int version = libwebp.WebPGetDecoderVersion();
29f79b
    System.out.println("libwebp version: " + Integer.toHexString(version));
29f79b
29f79b
    System.out.println("libwebp methods:");
29f79b
    final Method[] libwebpMethods = libwebp.class.getDeclaredMethods();
29f79b
    for (int i = 0; i < libwebpMethods.length; i++) {
29f79b
      System.out.println(libwebpMethods[i]);
29f79b
    }
29f79b
  }
29f79b
}