Class Util
java.lang.Object
com.sun.ts.tests.common.webclient.Util
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringgetBase64EncodedString(String value) BASE64 encodes the provided string.static StringgetEncodedStringFromStream(InputStream in, String enc) Returns a charset encoded string based on the provided InputStream and charset encoding.static StringgetHexValue(byte[] bytes, int pos, int len) getHexValuedisplays a formatted hex representation of the passed byte array.
- 
Method Details- 
getBase64EncodedStringBASE64 encodes the provided string.- Returns:
- BASE64 encoded string.
 
- 
getEncodedStringFromStreamReturns a charset encoded string based on the provided InputStream and charset encoding.- Returns:
- encoding string
- Throws:
- IOException
 
- 
getHexValuegetHexValuedisplays a formatted hex representation of the passed byte array. It also allows for only a specified offset and length of a particular array to be returned.- Parameters:
- bytes-- byte[]array to process.
- pos-- intspecifies offset to begin processing.
- len-- intspecifies the number of bytes to process.
- Returns:
- Stringformatted hex representation of processed array.
 
 
-