code: public static boolean isRenderableFile(Resource resource) {
          boolean result = false;
          try {
              Node node = resource.adaptTo(Node.class);
              if (node != null) {
                  NodeType type = node.getPrimaryNodeType();
                  if (ResourceUtil.TYPE_FILE.equals(type.getName())) {
                      String resoureName = resource.getName();
                      result = resoureName.toLowerCase().endsWith(LinkUtil.EXT_HTML);
                  }
              }
          } catch (RepositoryException e) {
              // ok, not renderable
          }
          return result;
      }
docs: Returns 'true' is this resource represents a 'file' witch can be displayed (a HTML file).