|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.configuration.DefaultConfigurationSerializer
A ConfigurationSerializer serializes configurations via SAX2 compliant parser.
Constructor Summary | |
DefaultConfigurationSerializer()
|
Method Summary | |
protected org.xml.sax.ContentHandler |
createContentHandler(javax.xml.transform.Result result)
Create a ContentHandler for an OutputStream |
protected javax.xml.transform.sax.SAXTransformerFactory |
getTransformerFactory()
Get the SAXTransformerFactory so we can get a serializer without being tied to one vendor. |
java.lang.String |
serialize(Configuration source)
Serialize the configuration object to a string |
void |
serialize(org.xml.sax.ContentHandler handler,
Configuration source)
Serialize the configuration to a ContentHandler |
void |
serialize(java.io.OutputStream outputStream,
Configuration source)
Serialize the configuration object to an output stream. |
void |
serialize(java.lang.String uri,
Configuration source)
Serialize the configuration object to an output stream derived from an URI. |
protected void |
serializeElement(org.xml.sax.ContentHandler handler,
org.xml.sax.helpers.NamespaceSupport namespaceSupport,
Configuration element)
Serialize each Configuration element. |
void |
serializeToFile(java.io.File file,
Configuration source)
Serialize the configuration object to a file using a File object. |
void |
serializeToFile(java.lang.String filename,
Configuration source)
Serialize the configuration object to a file using a filename. |
void |
setIndent(boolean indent)
Sets the Serializer's use of indentation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultConfigurationSerializer()
Method Detail |
public void setIndent(boolean indent)
indent
- a boolean
valueprotected org.xml.sax.ContentHandler createContentHandler(javax.xml.transform.Result result)
result
- the result
protected javax.xml.transform.sax.SAXTransformerFactory getTransformerFactory()
SAXTransformerFactory
valuepublic void serialize(org.xml.sax.ContentHandler handler, Configuration source) throws org.xml.sax.SAXException, ConfigurationException
handler
- a ContentHandler
to serialize tosource
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
ConfigurationException
- if an error occursprotected void serializeElement(org.xml.sax.ContentHandler handler, org.xml.sax.helpers.NamespaceSupport namespaceSupport, Configuration element) throws org.xml.sax.SAXException, ConfigurationException
handler
- a ContentHandler
to usenamespaceSupport
- a NamespaceSupport
to useelement
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
ConfigurationException
- if an error occurspublic void serializeToFile(java.lang.String filename, Configuration source) throws org.xml.sax.SAXException, java.io.IOException, ConfigurationException
filename
- a String
valuesource
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurs
ConfigurationException
- if an error occurspublic void serializeToFile(java.io.File file, Configuration source) throws org.xml.sax.SAXException, java.io.IOException, ConfigurationException
file
- a File
valuesource
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurs
ConfigurationException
- if an error occurspublic void serialize(java.io.OutputStream outputStream, Configuration source) throws org.xml.sax.SAXException, java.io.IOException, ConfigurationException
outputStream
- an OutputStream
valuesource
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurs
ConfigurationException
- if an error occurspublic void serialize(java.lang.String uri, Configuration source) throws org.xml.sax.SAXException, java.io.IOException, ConfigurationException
java.net.URL
object.
uri
- a String
valuesource
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurs
ConfigurationException
- if an error occurspublic java.lang.String serialize(Configuration source) throws org.xml.sax.SAXException, ConfigurationException
source
- a Configuration
value
org.xml.sax.SAXException
- if an error occurs
ConfigurationException
- if an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |