public static String urlSafeEncode(final byte[] input) {
    return encodeToString(input, DEFAULT | NO_PADDING | NO_WRAP | URL_SAFE);
  }
Url-safe base64 encodes a byte array to a string.
java_src/src/main/java/com/google/crypto/tink/subtle/Base64.java