ContentHandler text = new BodyContentHandler();//<co id="html.text.co"/>
LinkContentHandler links = new LinkContentHandler();//<co id="html.link.co"/>
ContentHandler handler = new TeeContentHandler(links, text);//<co id="html.merge"/>
Metadata metadata = new Metadata();//<co id="html.store"/>
Parser parser = new HtmlParser();//<co id="html.parser"/>
ParseContext context = new ParseContext();
parser.parse(input, handler, metadata, context);//<co id="html.parse"/>
System.out.println("Title: " + metadata.get(Metadata.TITLE));
System.out.println("Body: " + text.toString());
System.out.println("Links: " + links.getLinks());
/*