public void train(URL aUrl,String aEncoding) throws IOException {
  try (InputStream is=aUrl.openStream()){
    train(new InputStreamReader(is,aEncoding));
  }
 }

public void train ( URL aUrl , String aEncoding ) throws IOException { try ( InputStream is = aUrl . openStream ( ) ) { train ( new InputStreamReader ( is , aEncoding ) ) ; } }
read words from the given url and count their occurrences .
