public static String decodeCharset(String s,String charset){
  if (s == null) {
    return null;
  }
  try {
    byte buf[]=s.getBytes(ASCII_CHARSET);
    return (new String(buf,0,buf.length,charset));
  }
 catch (  UnsupportedEncodingException uee) {
    return s;
  }
}

public static String decodeCharset ( String s , String charset ) { if ( s == null ) { return null ; } try { byte buf [ ] = s . getBytes ( ASCII_CHARSET ) ; return ( new String ( buf , 0 , buf . length , charset ) ) ; } catch ( UnsupportedEncodingException uee ) { return s ; } }
decodes the string into specified charset
