Package org.jfree.data.xml
Class DatasetReader
java.lang.Object
org.jfree.data.xml.DatasetReader
public class DatasetReader extends Object
A utility class for reading datasets from XML.
-
Constructor Summary
Constructors Constructor Description DatasetReader() -
Method Summary
Modifier and Type Method Description static SAXParserFactorygetSAXParserFactory()Returns theSAXParserFactoryused to createSAXParserinstances.static CategoryDatasetreadCategoryDatasetFromXML(File file)Reads aCategoryDatasetfrom a file.static CategoryDatasetreadCategoryDatasetFromXML(InputStream in)Reads aCategoryDatasetfrom a stream.static PieDatasetreadPieDatasetFromXML(File file)Reads aPieDatasetfrom an XML file.static PieDatasetreadPieDatasetFromXML(InputStream in)Reads aPieDatasetfrom a stream.static voidsetSAXParserFactory(SAXParserFactory f)Sets the SAXParserFactory that will be used to create SAXParser instances.
-
Constructor Details
-
DatasetReader
public DatasetReader()
-
-
Method Details
-
getSAXParserFactory
Returns theSAXParserFactoryused to createSAXParserinstances.- Returns:
- The
SAXParserFactory(nevernull).
-
setSAXParserFactory
Sets the SAXParserFactory that will be used to create SAXParser instances. You would only call this method if you wish to configure a new factory because the default does not meet requirements.- Parameters:
f- the new factory (nullnot permitted).
-
readPieDatasetFromXML
Reads aPieDatasetfrom an XML file.- Parameters:
file- the file (nullnot permitted).- Returns:
- A dataset.
- Throws:
IOException- if there is a problem reading the file.
-
readPieDatasetFromXML
Reads aPieDatasetfrom a stream.- Parameters:
in- the input stream.- Returns:
- A dataset.
- Throws:
IOException- if there is an I/O error.
-
readCategoryDatasetFromXML
Reads aCategoryDatasetfrom a file.- Parameters:
file- the file.- Returns:
- A dataset.
- Throws:
IOException- if there is a problem reading the file.
-
readCategoryDatasetFromXML
Reads aCategoryDatasetfrom a stream.- Parameters:
in- the stream.- Returns:
- A dataset.
- Throws:
IOException- if there is a problem reading the file.
-