public byte[] getResponseBodyAsBytes() { if (fileBytes.length == 0) { return StringUtils.getBytesUtf8(getBody()); } return fileBytes; }
public static int calculateStringLength(final String post) { if (StringUtils.isSet(post)) { return StringUtils.getBytesUtf8(post).length; } return 0; }
public static String encodeBase64(final String toEncode) { return BASE_64_ENCODER.encodeToString(StringUtils.getBytesUtf8(toEncode)); }