Class Util
java.lang.Object
ee.jakarta.tck.ws.rs.common.webclient.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getBase64EncodedString
(String value) BASE64 encodes the provided string.static String
getEncodedStringFromStream
(InputStream in, String enc) Returns a charset encoded string based on the provided InputStream and charset encoding.static String
getHexValue
(byte[] bytes, int pos, int len) getHexValue
displays 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
getHexValue
displays 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
-int
specifies offset to begin processing.len
-int
specifies the number of bytes to process.- Returns:
String
formatted hex representation of processed array.
-