Blame SOURCES/libwebp_jni_example.java

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