Class Util
java.lang.Object
ee.jakarta.tck.ws.rs.common.webclient.Util
-
Method Summary
Modifier 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
-
getBase64EncodedString
BASE64 encodes the provided string.- Returns:
- BASE64 encoded string.
-
getEncodedStringFromStream
Returns a charset encoded string based on the provided InputStream and charset encoding.- Returns:
- encoding string
- Throws:
IOException
-
getHexValue
getHexValuedisplays 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.
-