org.apache.commons.feedparser
Class FeedParserImpl

java.lang.Object
  extended by org.apache.commons.feedparser.FeedParserImpl
All Implemented Interfaces:
FeedParser

public class FeedParserImpl
extends Object
implements FeedParser

This FeedParser implementation is based on JDOM and Jaxen and is based around XPath and JDOM iteration. While the implementation is straight forward it has not been optimized for performance. A SAX based parser would certainly be less memory intensive but with the downside of being harder to develop.

Version:
$Id: FeedParserImpl.java 373614 2006-01-30 22:31:21Z mvdb $
Author:
Kevin A. Burton (burtonator)

Constructor Summary
FeedParserImpl()
           
 
Method Summary
 void parse(FeedParserListener listener, org.jdom.Document doc)
          Parse this feed.
 void parse(FeedParserListener listener, InputStream is)
          Deprecated. Use #parse( FeedParserException, InputStream, String )
 void parse(FeedParserListener listener, InputStream is, String resource)
          Parse this feed.
 byte[] toByteArray(InputStream is)
          Convert an InputStream to a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedParserImpl

public FeedParserImpl()
Method Detail

parse

public void parse(FeedParserListener listener,
                  InputStream is,
                  String resource)
           throws FeedParserException
Parse this feed.

Specified by:
parse in interface FeedParser
Parameters:
resource - The URL of the feed being parsed. This is optional and may be null but is used when an exception is thrown to aid debugging.
Throws:
FeedParserException

parse

public void parse(FeedParserListener listener,
                  InputStream is)
           throws FeedParserException
Deprecated. Use #parse( FeedParserException, InputStream, String )

Specified by:
parse in interface FeedParser
Throws:
FeedParserException

parse

public void parse(FeedParserListener listener,
                  org.jdom.Document doc)
           throws FeedParserException
Parse this feed.

Specified by:
parse in interface FeedParser
Throws:
FeedParserException

toByteArray

public byte[] toByteArray(InputStream is)
                   throws IOException
Convert an InputStream to a byte array.

Throws:
IOException


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.