public static String encodeBase64String(final byte[] bytes) {
        if (null == bytes) {
            return null;
        }

        return getEncoder().encodeToString(bytes);
    }
Encodes binary data using the base64 algorithm but does not chunk the output.
httpclient5/src/main/java/org/apache/hc/client5/http/utils/Base64.java