private String getResponseBodyPreview(byte[] body, Charset charset) {
      try {
        Reader reader = new InputStreamReader(new ByteArrayInputStream(body), charset);
        CharBuffer result = CharBuffer.allocate(maxBodyCharsLength);

        reader.read(result);
        reader.close();
        ((Buffer) result).flip();
        return result + "... (" + body.length + " bytes)";
      } catch (IOException e) {
        return e + ", failed to parse response";
      }
    }
The Response body.

@return an Optional wrapping the response body.
core/src/main/java/feign/FeignException.java