code: public static String encodeString(final String string, final String encoding) throws
  			UnsupportedEncodingException {
  		byte[] stringBytes = string.getBytes(encoding);
  		return encode(stringBytes);
  	}
docs: Encodes a string into Base64 format. No blanks or line breaks are inserted.
  
  @param string a String to be encoded.
  @param encoding The character encoding of the string.
  @return A String with the Base64 encoded data.
  
  @throws UnsupportedEncodingException if the java runtime does not support <code>encoding</code>.