FreeHEP API
Version current

org.freehep.xml.io
Class XMLIOFileManager

java.lang.Object
  extended byorg.freehep.xml.io.XMLIOStreamManager
      extended byorg.freehep.xml.io.XMLIOFileManager

public class XMLIOFileManager
extends XMLIOStreamManager

Class XMLIOFileManager deals with xml files.

Version:
1.0
Author:
turri
Source Code:
XMLIOFileManager.java

Constructor Summary
XMLIOFileManager(String fileName)
           
 
Method Summary
 org.jdom.Element getRootElement()
          After opening the input file, converts the text in xml format and returns the main root Element
 boolean isXMLFileZipped()
           
 void saveRootElement(org.jdom.Element rootEl)
          Write to the output Stream performing an xml to text conversion
 void saveRootElement(org.jdom.Element rootEl, String docName, String sysId)
          Write the output file performing an xml to text conversion
 void setXMLFileZipped(boolean isZipped)
           
 
Methods inherited from class org.freehep.xml.io.XMLIOStreamManager
getBuilder, saveRootElement, setXMLInputStream, setXMLInputStream, setXMLOutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLIOFileManager

public XMLIOFileManager(String fileName)
Method Detail

getRootElement

public org.jdom.Element getRootElement()
                                throws org.jdom.JDOMException,
                                       IOException
After opening the input file, converts the text in xml format and returns the main root Element

Overrides:
getRootElement in class XMLIOStreamManager
Returns:
the jdom main Element or null if something went wrong in the text to xml conversion (the trace is printed).
Throws:
org.jdom.JDOMException - from XMLIOStreamManager
IOException - from XMLIOStreamManager
See Also:
XMLIOStreamManager.getRootElement(), XMLIOStreamManager.getRootElement()

saveRootElement

public void saveRootElement(org.jdom.Element rootEl,
                            String docName,
                            String sysId)
                     throws IOException
Write the output file performing an xml to text conversion

Parameters:
rootEl - is the root Element that gets converted to text and dumped in the output file.
Throws:
IOException - from XMLIOStreamManager
See Also:
XMLIOStreamManager.saveRootElement( Element )

saveRootElement

public void saveRootElement(org.jdom.Element rootEl)
                     throws IOException
Description copied from class: XMLIOStreamManager
Write to the output Stream performing an xml to text conversion

Overrides:
saveRootElement in class XMLIOStreamManager
Parameters:
rootEl - is the root Element that gets converted to text and dumped in the output file.
Throws:
IOException - from the output method of XMLOutputter
See Also:
XMLOutputter.output( Document, OutputStream )

isXMLFileZipped

public boolean isXMLFileZipped()

setXMLFileZipped

public void setXMLFileZipped(boolean isZipped)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.