Package org.apache.wsil.util
Class Util
java.lang.Object
org.apache.wsil.util.Util
This class will ...
- Version:
- 1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateHttpsURL(String url) Create an HTTPS URL.static URLCreates a URL object.static voidThis method prints a formatted message using System.out.prinln.static voidThis method prints a formatted message using System.out.prinln.static ThreadGroupfindThreadGroup(String sName) Local a thread group using its name.static StringBuild a URL string from hostname, port and URN.static StringGet date/time stamp for current date/time.static StringgetDateTimeStamp(Date date) Get date/time stamp for current date/time.static InputStreamgetInputStream(String sResourceName) Get contents of a resource and return as a input stream.static InputStreamgetInputStream(URL urlFile) Get the input stream from a URL.static StringGet local host name.static voidThis method prints a formatted message using System.out.prinln.static voidThis method prints a formatted message using System.out.prinln.static StringreplaceString(String sText, String sFind, String sReplace) This method will replace all of the occurances of a string with a substitution string.static String[]Convert a string into a string array.static String[]toStringArray(String s, String sDelim) Convert a string into a string array.static StringtoXMLString(Collection collection) Get XML string representation for WSIL element.
-
Field Details
-
sClassName
Class name. -
LINE_SEPARATOR
Line separator character.
-
-
Method Details
-
findThreadGroup
Local a thread group using its name.- Parameters:
sName- thread group name- Returns:
- Returns thread group.
-
out
This method prints a formatted message using System.out.prinln.- Parameters:
className- class name which originated messagemethodName- method name which originated messagee- exception
-
out
This method prints a formatted message using System.out.prinln.- Parameters:
className- class name which originated messagemethodName- method name which originated messagemsg- message text
-
debug
This method prints a formatted message using System.out.prinln.- Parameters:
className- class name which originated messagemethodName- method name which originated messagee- exception
-
debug
This method prints a formatted message using System.out.prinln.- Parameters:
className- class name which originated messagemethodName- method name which originated messagemsg- message text
-
getDateTimeStamp
Get date/time stamp for current date/time.- Parameters:
sName- thread group name
-
getDateTimeStamp
Get date/time stamp for current date/time.- Parameters:
sName- thread group name
-
getInputStream
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
Get the input stream from a URL.- Parameters:
url- the URL to get the input stream from- Throws:
IOExceptionConnectException
-
getLocalHostName
Get local host name. -
formatURL
Build a URL string from hostname, port and URN.- Parameters:
hostname- the hostnameport- the porturn- the URN- Returns:
- Returns formatted URL string.
-
replaceString
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
Convert a string into a string array.- Parameters:
s- string to convert to a string array
-
toStringArray
Convert a string into a string array.- Parameters:
s- string to convert to a string array
-
createURL
public static URL createURL(String urlString) throws MalformedURLException, ClassNotFoundException, InstantiationException, IllegalAccessException 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:
MalformedURLExceptionClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
createHttpsURL
Create an HTTPS URL. -
toXMLString
Get XML string representation for WSIL element.
-