Class ConfFileUtils


  • public class ConfFileUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfFileUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Properties getProperties​(java.net.URL url)
      Load a Properties file from a URL, return null if it fails
      static java.net.URL getURL​(java.lang.String confName, java.lang.ClassLoader classLoader, java.lang.Class cls)
      Return the URL for a given conf file
      static java.net.URL getURLForFile​(java.lang.String fileName)
      Return URL for given filename
      static java.lang.String URLContentsToString​(java.net.URL url)  
      • Methods inherited from class java.lang.Object

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

      • ConfFileUtils

        public ConfFileUtils()
    • Method Detail

      • getURL

        public static java.net.URL getURL​(java.lang.String confName,
                                          java.lang.ClassLoader classLoader,
                                          java.lang.Class cls)
        Return the URL for a given conf file
        Parameters:
        confName -
        classLoader -
        Returns:
      • getURLForFile

        public static java.net.URL getURLForFile​(java.lang.String fileName)
        Return URL for given filename
        Parameters:
        fileName -
        Returns:
        URL
      • URLContentsToString

        public static java.lang.String URLContentsToString​(java.net.URL url)
      • getProperties

        public static java.util.Properties getProperties​(java.net.URL url)
        Load a Properties file from a URL, return null if it fails
        Parameters:
        url -
        Returns:
        URL