Beispiel #1
0
  public byte[] getResponseBodyAsBytes() {

    if (fileBytes.length == 0) {
      return StringUtils.getBytesUtf8(getBody());
    }
    return fileBytes;
  }
Beispiel #2
0
 public static int calculateStringLength(final String post) {
   if (StringUtils.isSet(post)) {
     return StringUtils.getBytesUtf8(post).length;
   }
   return 0;
 }
Beispiel #3
0
 public static String encodeBase64(final String toEncode) {
   return BASE_64_ENCODER.encodeToString(StringUtils.getBytesUtf8(toEncode));
 }