public String fromBase64(String toDecode){
  try {
    byte[] bytes=Base64.decodeBase64(toDecode.trim());
    return new String(bytes,Charset.forName("utf-8"));
  }
 catch (  Exception e) {
    LOG.error("Error base64 decoding " + toDecode + ": "+ e);
  }
  return toDecode;
}

public String fromBase64 ( String toDecode ) { try { byte [ ] bytes = Base64 . decodeBase64 ( toDecode . trim ( ) ) ; return new String ( bytes , Charset . forName ( "utf-8" ) ) ; } catch ( Exception e ) { LOG . error ( "Error base64 decoding " + toDecode + ": " + e ) ; } return toDecode ; }
returns a string ' s decoded from base 64
