Exemplo n.º 1
0
 /**
  * Peturn parser to pool
  *
  * @param parser
  */
 protected void reuseParser(HtmlParser parser) {
   if (null != parser) {
     if (parser instanceof NekkoParser) {
       synchronized (_xhtmlParsersPool) {
         if (_xhtmlParsersPool.size() < STACK_SIZE) {
           ((NekkoParser) parser).reset();
           _xhtmlParsersPool.push(parser);
         }
       }
     }
   }
 }