Get updating html elements from website using Java
<p>I want to get updating html elements from a website by using Java.
For example, the twitch-chat.  I've tried using <code>InputStream</code> already, but its not continuously refreshing it.</p>

<pre><code>URL url;

try {
    String a="www.google.com";
    url = new URL(a);
    URLConnection conn = url.openConnection();

    BufferedReader br = new BufferedReader(
                       new InputStreamReader(conn.getInputStream()));

    String inputLine;
    while ((inputLine = br.readLine()) != null) {
        System.out.println(inputLine);
    }
    br.close();

    System.out.println("Done");

} catch (MalformedURLException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}
</code></pre>

<p>Any idea on how I could get that to work?</p>