title: How to validate HTML using JTidy?
body: <p>I want to validate my html using JTidy . i want to a response of true or false if it is validate or not respectivily. currently i am using this code.</p>
  
  <pre><code>String htmlData = "&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div&gt;Hello Java &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;";  
  Tidy tidy = new Tidy();
  
  InputStream stream = new ByteArrayInputStream(htmlData.getBytes());
  tidy.parse(stream, System.out);
  </code></pre>
  
  <p>Is there any method or way through which i get a boolean response whether my html is validate or not ?
  Any help is appriciated.</p>