Class ToolsResourceUtil


  • public class ToolsResourceUtil
    extends java.lang.Object
    Various resource utility methods
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger log  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String findTitleFromXhtml​(Resource resource)
      Retrieves whatever it finds between <title>...</title> or <h1-7>...</h1-7>.
      static java.lang.String getTitle​(Resource resource)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private static org.slf4j.Logger log
    • Constructor Detail

      • ToolsResourceUtil

        public ToolsResourceUtil()
    • Method Detail

      • getTitle

        public static java.lang.String getTitle​(Resource resource)
      • findTitleFromXhtml

        public static java.lang.String findTitleFromXhtml​(Resource resource)
        Retrieves whatever it finds between <title>...</title> or <h1-7>...</h1-7>. The first match is returned, even if it is a blank string. If it finds nothing null is returned.
        Parameters:
        resource -
        Returns:
        whatever it finds in the resource between <title>...</title> or <h1-7>...</h1-7>.