|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.tools.cfe.config.util.ConfigResourceUtil
public class ConfigResourceUtil
The utility class for loading and storing SDO instances as XML files.
Constructor Summary | |
---|---|
ConfigResourceUtil()
The default constructor. |
Method Summary | |
---|---|
static ConfigResourceUtil |
getInstance()
Return the single instance of this class. |
DocumentRoot |
load(InputStream istream)
Load an existing XML file. |
DocumentRoot |
load(String filename)
Load an existing XML file. |
void |
save(DocumentRoot documentRoot,
OutputStream ostream)
Save as an XML output stream. |
void |
save(DocumentRoot documentRoot,
String filename)
Save as an XML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigResourceUtil()
Method Detail |
---|
public static ConfigResourceUtil getInstance()
public DocumentRoot load(String filename) throws IOException
filename
- the absolute path name of the XML file to be loaded.
IOException
- failed loading from an XML file.public DocumentRoot load(InputStream istream) throws IOException
istream
- the InputStream to load the XML content from.
IOException
- failed loading from an XML file.public void save(DocumentRoot documentRoot, String filename) throws IOException
documentRoot
- the document root of the SDO instances.filename
- the absolute path name of the XML file to be created.
IOException
- failed storing to an XML file.public void save(DocumentRoot documentRoot, OutputStream ostream) throws IOException
documentRoot
- the document root of the SDO instances.ostream
- the OutputStream where the XML content is to be written.
IOException
- failed storing to an XML file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |