public static InputStream getResource(final String resourcePath) {
    for (final String path : SEARCH_PATHS) {
      final InputStream stream = BinDiff.class.getResourceAsStream(path + resourcePath);
      if (stream != null) {
        return stream;
      }
    }
    logger.atWarning().log("Resource not found: \"%s\"", resourcePath);
    return null;
  }
Utility class to load images from BinDiff package resources.
java/ui/src/main/java/com/google/security/zynamics/bindiff/utils/ResourceUtils.java