Encode this instance to base64url-string with 'UTF-8' charset.
<p>attention: This method's result would be cache by first invoked.
So each time you invoked, you get the same result.</p>

@return The encoded base64url-string.
488476
public String encode() {
    // System.out.println(toJson());
    if (base64 == null)
      base64 = new String(
        Base64.getUrlEncoder().encode(toJson().toString().getBytes(StandardCharsets.UTF_8)),
        StandardCharsets.UTF_8
      );
    return base64;
  }
74279
public String encodeUrl() {
		StringBuffer sb = new StringBuffer(DEFAULT_BUFFER_SIZE);
		for (Iterator iter = components.values().iterator(); iter.hasNext();) {
			LdapRdnComponent component = (LdapRdnComponent) iter.next();
			sb.append(component.encodeUrl());
			if (iter.hasNext()) {
				sb.append("+");
			}
		}

		return sb.toString();
	}
503374
def base64(self, charset=None):
        ''''''
        return b64encode(self.bytes()).decode(charset or self.charset)
274180
public String getPublicKeyBase64() {
		final PublicKey publicKey = getPublicKey();
		return (null == publicKey) ? null : Base64.encode(publicKey.getEncoded());
	}
197617
protected String getBase64(InputStream in) throws IOException {
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		CopyUtil.copy(in, out);
		return new String(Base64.encodeBase64(out.toByteArray()), "UTF-8"); //$NON-NLS-1$
	}
438162
public java.lang.String getRequestUrl() {
    java.lang.Object ref = requestUrl_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      requestUrl_ = s;
      return s;
    }
  }
536617
@Nullable
    public final Charset getEncoding() {
        final String parameter = getParameter(ENCODING);
        if (parameter == null) {
            return null;
        }
        return Charset.forName(parameter);
    }
1118309
private String encode() {
        byte[] pack = new byte[4 + m_bits.length];

        pack[0] = (byte) ((FP_SIZE & 0xffffffff) >> 24);
        pack[1] = (byte) ((FP_SIZE & 0x00ffffff) >> 16);
        pack[2] = (byte) ((FP_SIZE & 0x0000ffff) >> 8);
        pack[3] = (byte) (FP_SIZE & 0x000000ff);
        for (int i = 0; i < m_bits.length; ++i) {
            pack[i + 4] = m_bits[i];
        }
        return base64Encode(pack);
    }
303449
public static byte[] encode(byte[] in) {
        return org.apache.commons.codec.binary.Base64.encodeBase64(in);
    }
196319
public String getString() {
        byte[] rawdata = get();
        String charset = getCharSet();
        if (charset == null) {
            charset = DEFAULT_CHARSET;
        }
        try {
            return new String(rawdata, charset);
        } catch (UnsupportedEncodingException e) {
            return new String(rawdata);
        }
    }
143288
public static String encodeUrlSafeBase64(String value) {
        return new String(UrlSafeBase64.encode(value.getBytes(Charsets.UTF_8)));
    }
678487
@Override
    public String getCharacterEncoding() {
        if (null == this.encoding) {
            EncodingUtils encodingUtils = connection.getEncodingUtils();
            this.encoding = encodingUtils.getEncodingFromLocale(this.locale);
            if (null == this.encoding) {
                this.encoding = encodingUtils.getDefaultEncoding();
            }
        }
        return this.encoding;
    }
1109152
@Nonnull
  public String getContentAsBase64EncodedString ()
  {
    // Add Base64 encoded String
    final byte [] aEncoded = Base64.encodeBytesToBytes (m_aContent);
    // Print the string in the specified charset
    return new String (aEncoded, m_aCharset);
  }
1237703
@Override
    public String encodeBase64(byte[] value) {
        return new String(Base64.encodeBase64(value), Charsets.UTF_8);
    }
466477
public static String encode(String str)
    {
        String ret = str;

        try
        {
            // Obfuscate the string
            if(ret != null)
                ret = new String(Base64.encodeBase64(ret.getBytes()));
        }
        catch(NoClassDefFoundError e)
        {
            System.out.println("WARNING: unable to encode: "
                +e.getClass().getName()+": "+e.getMessage());
        }

        return ret;
    }
69530
public static String encodeToString(byte[] src) {
		if (src == null) {
			return null;
		}
		if (src.length == 0) {
			return "";
		}
		String result;
		try {
			result = new String(delegate.encode(src), DEFAULT_CHARSET.displayName());
		} catch (UnsupportedEncodingException e) {
			// should not happen, UTF-8 is always supported
			throw new IllegalStateException(e);
		}
		return result;
	}
33170
public static String encodeUrlSafe(String source, String charset) {
		return Base64Encoder.encodeUrlSafe(source, charset);
	}