Java code for extracting text from HTML pages