1 17 package com.sun.syndication.io; 18 19 import com.sun.syndication.feed.synd.SyndFeed; 20 import com.sun.syndication.feed.synd.SyndFeedImpl; 21 import org.jdom.Document; 22 import org.xml.sax.InputSource ; 23 24 import java.io.File ; 25 import java.io.FileNotFoundException ; 26 import java.io.IOException ; 27 import java.io.Reader ; 28 29 38 public class SyndFeedInput { 39 private WireFeedInput _feedInput; 40 41 46 public SyndFeedInput() { 47 this(false); 48 } 49 50 56 public SyndFeedInput(boolean validate) { 57 _feedInput = new WireFeedInput(validate); 58 } 59 60 74 public void setXmlHealerOn(boolean heals) { 75 _feedInput.setXmlHealerOn(heals); 76 } 77 78 92 public boolean getXmlHealerOn() { 93 return _feedInput.getXmlHealerOn(); 94 } 95 96 97 108 public SyndFeed build(File file) throws FileNotFoundException ,IOException ,IllegalArgumentException ,FeedException { 109 return new SyndFeedImpl(_feedInput.build(file)); 110 } 111 112 121 public SyndFeed build(Reader reader) throws IllegalArgumentException ,FeedException { 122 return new SyndFeedImpl(_feedInput.build(reader)); 123 } 124 125 134 public SyndFeed build(InputSource is) throws IllegalArgumentException ,FeedException { 135 return new SyndFeedImpl(_feedInput.build(is)); 136 } 137 138 147 public SyndFeed build(org.w3c.dom.Document document) throws IllegalArgumentException ,FeedException { 148 return new SyndFeedImpl(_feedInput.build(document)); 149 } 150 151 160 public SyndFeed build(Document document) throws IllegalArgumentException ,FeedException { 161 return new SyndFeedImpl(_feedInput.build(document)); 162 } 163 164 } 165 | Popular Tags |