private static String encodeBase64ChunkedURLSafeString(final byte[] binaryData) {
        return Base64.encodeBase64String(binaryData)
            .replace('+', '-')
            .replace('/', '_');
    }
Encodes the given binaryData in a format that is compatible with the Docker Engine API.
That is, base64 encoded, padded, and URL safe.

@param binaryData data to encode
@return encoded data
src/main/java/io/fabric8/maven/docker/access/AuthConfig.java