public static String encodeFromString(String plain,String charset) throws CoderException, UnsupportedEncodingException {
  return encode(plain.getBytes(charset));
}

public static String encodeFromString ( String plain , String charset ) throws CoderException , UnsupportedEncodingException { return encode ( plain . getBytes ( charset ) ) ; }
encodes a string to base64 string
