Class Util

java.lang.Object
org.apache.wsil.util.Util

public final class Util extends Object
This class will ...
Version:
1.0
  • Field Details

    • sClassName

      protected static String sClassName
      Class name.
    • LINE_SEPARATOR

      public static final String LINE_SEPARATOR
      Line separator character.
  • Method Details

    • findThreadGroup

      public static ThreadGroup findThreadGroup(String sName)
      Local a thread group using its name.
      Parameters:
      sName - thread group name
      Returns:
      Returns thread group.
    • out

      public static void out(String className, String methodName, Exception e)
      This method prints a formatted message using System.out.prinln.
      Parameters:
      className - class name which originated message
      methodName - method name which originated message
      e - exception
    • out

      public static void out(String className, String methodName, String msg)
      This method prints a formatted message using System.out.prinln.
      Parameters:
      className - class name which originated message
      methodName - method name which originated message
      msg - message text
    • debug

      public static void debug(String className, String methodName, Exception e)
      This method prints a formatted message using System.out.prinln.
      Parameters:
      className - class name which originated message
      methodName - method name which originated message
      e - exception
    • debug

      public static void debug(String className, String methodName, String msg)
      This method prints a formatted message using System.out.prinln.
      Parameters:
      className - class name which originated message
      methodName - method name which originated message
      msg - message text
    • getDateTimeStamp

      public static String getDateTimeStamp()
      Get date/time stamp for current date/time.
      Parameters:
      sName - thread group name
    • getDateTimeStamp

      public static String getDateTimeStamp(Date date)
      Get date/time stamp for current date/time.
      Parameters:
      sName - thread group name
    • getInputStream

      public static InputStream getInputStream(String sResourceName) throws IOException
      Get contents of a resource and return as a input stream.
      Parameters:
      sResourceName - the name of the resource to get and return as an input stream
      Throws:
      IOException
    • getInputStream

      public static InputStream getInputStream(URL urlFile) throws IOException, ConnectException
      Get the input stream from a URL.
      Parameters:
      url - the URL to get the input stream from
      Throws:
      IOException
      ConnectException
    • getLocalHostName

      public static String getLocalHostName()
      Get local host name.
    • formatURL

      public static String formatURL(String hostname, String port, String urn)
      Build a URL string from hostname, port and URN.
      Parameters:
      hostname - the hostname
      port - the port
      urn - the URN
      Returns:
      Returns formatted URL string.
    • replaceString

      public static String replaceString(String sText, String sFind, String sReplace)
      This method will replace all of the occurances of a string with a substitution string.
      Parameters:
      sText - String to udpate.
      sFind - String to find.
      sReplace - String to use for substitution.
      Returns:
      Returns updated string.
    • toStringArray

      public static String[] toStringArray(String s)
      Convert a string into a string array.
      Parameters:
      s - string to convert to a string array
    • toStringArray

      public static String[] toStringArray(String s, String sDelim)
      Convert a string into a string array.
      Parameters:
      s - string to convert to a string array
    • createURL

      Creates a URL object. If the URL uses the https protocol, then the correct URLStreamHandler is associated with the URL object.
      Parameters:
      urlString - URL string to format into a URL object
      Returns:
      Returns a URL object. A null value is returned if the input URL string is null.
      Throws:
      MalformedURLException
      ClassNotFoundException
      InstantiationException
      IllegalAccessException
    • createHttpsURL

      public static String createHttpsURL(String url)
      Create an HTTPS URL.
    • toXMLString

      public static String toXMLString(Collection collection)
      Get XML string representation for WSIL element.