net.sf.mavenhist.extractor.util
Class DocumentReader

java.lang.Object
  extended by net.sf.mavenhist.extractor.util.DocumentReader

public final class DocumentReader
extends Object

Utility methods to read and parse an xml file.


Method Summary
static InputStream getInputStream(String filePath)
           
static Document getParsedDoc(InputStream inputStream)
          Gets the parsed document from a file path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParsedDoc

public static Document getParsedDoc(InputStream inputStream)
                             throws ParserConfigurationException,
                                    SAXException,
                                    FileNotFoundException,
                                    IOException
Gets the parsed document from a file path.

Parameters:
filePath - e.g. src/test/resources/org/xxx/checkstyle-raw-report.xml
Returns:
loaded document.
Throws:
ParserConfigurationException
IOException - IO Error occured when reading file
SAXException - File is unparsable
Exception - it's a test so this may happen.
FileNotFoundException

getInputStream

public static InputStream getInputStream(String filePath)
                                  throws FileNotFoundException
Throws:
FileNotFoundException


Copyright © 2009. All Rights Reserved.