private String pickEncoding(InputSource inputSource){
  Reader reader=inputSource.getCharacterStream();
  if (reader != null) {
    return CHARACTER_ENCODING;
  }
  String encoding=inputSource.getEncoding();
  return encoding == null ? DEFAULT_ENCODING : encoding;
}

private String pickEncoding ( InputSource inputSource ) { Reader reader = inputSource . getCharacterStream ( ) ; if ( reader != null ) { return CHARACTER_ENCODING ; } String encoding = inputSource . getEncoding ( ) ; return encoding == null ? DEFAULT_ENCODING : encoding ; }
picks an encoding for an external entity . defaults to utf - 8 .
