private void callNativeHtmlParser( byte[] htmlBytes, String htmlEncoding, boolean forceAcceptMeta )
throws ParserException, DocumentException
{
if (htmlBytes.length > htmlSizeLimit)
{
throw new DocumentException("Html too long:" + htmlBytes.length +">" + this.htmlSizeLimit);
}
//html = html.replaceAll("<\\s*(STYLE|style|script|SCRIPT)\\s*>", "<$1 harmless=''> ");
this.instructionsPool = new InstructionsPool(16 + (htmlBytes.length / 10));
try
{
this.parseHtml( htmlBytes, htmlEncoding, forceAcceptMeta );
}
catch( ParserException e )
{
throw e;
}
catch( Throwable e )
{
System.err.println(Thread.currentThread() + "Warning: could not parse html :" + e.toString());
throw new DocumentException(e);
}
}