public Reader create(InputStream is,String javaEncoding) throws UnsupportedEncodingException {
  if (Charset.isSupported(javaEncoding)) {
    Charset charset=Charset.forName(javaEncoding);
    return new InputStreamReader(is,charset);
  }
 else {
    return new InputStreamReader(is,javaEncoding);
  }
}

public Reader create ( InputStream is , String javaEncoding ) throws UnsupportedEncodingException { if ( Charset . isSupported ( javaEncoding ) ) { Charset charset = Charset . forName ( javaEncoding ) ; return new InputStreamReader ( is , charset ) ; } else { return new InputStreamReader ( is , javaEncoding ) ; } }
create a jdk - based reader .
