Package net.htmlparser.jericho

Examples of net.htmlparser.jericho.StreamedSource


  protected HtmlFilterReaderBase( Reader reader ) throws IOException, ParserConfigurationException {
    this.reader = reader;
    document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
    stack = new Stack<Level>();
    parser = new StreamedSource( reader );
    iterator = parser.iterator();
    writer = new StringWriter();
    buffer = writer.getBuffer();
    offset = 0;
  }
View Full Code Here


  private StringBuffer buffer;

  protected XmlFilterReader( Reader reader ) throws IOException {
    this.reader = reader;
    stack = new Stack<Element>();
    parser = new StreamedSource( reader );
    iterator = parser.iterator();
    writer = new StringWriter();
    buffer = writer.getBuffer();
    offset = 0;
  }
View Full Code Here

 
  private StartTag getStartTag(Asset htmlAsset) throws IOException
  {
    try(Reader reader = htmlAsset.getReader())
    {
      StreamedSource streamedSource = new StreamedSource(reader);
      StartTag startTag = null;
     
      try
      {
        for(Segment nextSegment : streamedSource)
        {
          if(nextSegment instanceof StartTag)
          {
            startTag = (StartTag) nextSegment;
            break;
          }
        }
      }
      finally
      {
        streamedSource.close();
      }
     
      return startTag;
    }
  }
View Full Code Here

TOP

Related Classes of net.htmlparser.jericho.StreamedSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.