Class GeneralUtils

java.lang.Object
ch.autumo.commons.utils.common.GeneralUtils

public class GeneralUtils extends Object
General Utils.
  • Method Details

    • getStackTrace

      public static String getStackTrace(Throwable throwable)
      Get an exception stack trace as text.
      Parameters:
      throwable - thropwable/exception
      Returns:
      stack trace text
    • getHtmlStackTrace

      public static String getHtmlStackTrace(Throwable throwable)
      Get an exception stack trace as html.
      Parameters:
      throwable - thropwable/exception
      Returns:
      stack trace html
    • copyProperties

      public static Properties copyProperties(Properties destination, Properties toCopy)
      Copy props to destination props. Existing destination properties are not overwritten !
      Parameters:
      destination - destination props
      toCopy - props to copy into destination
      Returns:
      destination props with values of the props copied
    • copyProperties

      public static Properties copyProperties(Properties destination, Properties toCopy, boolean overwrite)
      Copy props to destination props.
      Parameters:
      destination - destination props
      toCopy - props to copy into destination
      overwrite - true, if existing destination properties should be overwritten
      Returns:
      destination props with values of the props copied
    • printProperties

      public static void printProperties(Properties props)
      Print properties.
      Parameters:
      props - props
    • createMap

      public static Map<String,String> createMap(String[] keys, String[] values)
      Create map.
      Parameters:
      keys - keys
      values - values
      Returns:
      map