private Reader enc(String name,InputStream is) throws UnsupportedEncodingException {
  if (name.equals("UTF-8")) {
    return new ReaderUTF8(is);
  }
 else   if (name.equals("UTF-16LE")) {
    return new ReaderUTF16(is,'l');
  }
 else   if (name.equals("UTF-16BE")) {
    return new ReaderUTF16(is,'b');
  }
 else {
    return new InputStreamReader(is,name);
  }
}

private Reader enc ( String name , InputStream is ) throws UnsupportedEncodingException { if ( name . equals ( "UTF-8" ) ) { return new ReaderUTF8 ( is ) ; } else if ( name . equals ( "UTF-16LE" ) ) { return new ReaderUTF16 ( is , 'l' ) ; } else if ( name . equals ( "UTF-16BE" ) ) { return new ReaderUTF16 ( is , 'b' ) ; } else { return new InputStreamReader ( is , name ) ; } }
sets up the document reader .
