long size = f.length ();
FileInputStream fis = new FileInputStream (f);
DataInputStream dis = new DataInputStream (fis);
byte[] buf = new byte[(int)size];
dis.readFully (buf);
HtmlParser parser = new HtmlParser ();
parser.setText (buf);
HtmlBlock block = parser.parse ();
for (Token t : block.getTokens ()) {
System.out.print ("t.type: " + t.getType ());
if (t.getType () == TokenType.TAG)
System.out.print (", tag: " + t.getTag ().getType ());
System.out.println ();