docs: public String asBase64(BaseEncoding.Dialect dialect, BaseEncoding.Padding padding) throws IOException {
          String standardBase64 = DatatypeConverter.printBase64Binary(asByteArray(false));
          if (dialect == BaseEncoding.Dialect.STANDARD && padding == BaseEncoding.Padding.STANDARD) {
              return standardBase64;
          }
  
          StringBuilder safeBase64 = new StringBuilder(standardBase64.length());
          for(int i=0; i<standardBase64.length(); i++) {
              char c = standardBase64.charAt(i);
  
              if (dialect == BaseEncoding.Dialect.SAFE) {
                  if (c == '+') c = '-';
                  else if (c == '/') c = '_';
              }
  
              if (c == '=') {
                  if (padding == BaseEncoding.Padding.STANDARD) {
                      safeBase64.append('=');
                  }
                  else if (padding == BaseEncoding.Padding.SAFE) {
                      safeBase64.append('.');
                  }
              } else {
                  safeBase64.append(c);
              }
          }
          return safeBase64.toString();
      }