Class XMLProperties

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--XMLProperties
All Implemented Interfaces:
java.lang.Cloneable, org.xml.sax.ContentHandler, java.util.Map, java.io.Serializable

public class XMLProperties
extends java.util.Properties
implements org.xml.sax.ContentHandler

Extends java.util.Properties so that properties are read and written in an XML format.

Version:
$03/07/16 23:59:14 mdh$
Author:
Malcolm D. Hyman
See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
XMLProperties()
           
XMLProperties(java.util.Properties p)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          This is part of the ContentHandler interface.
 void endDocument()
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          This is part of the ContentHandler interface.
 void endPrefixMapping(java.lang.String prefix)
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void load(java.io.InputStream in)
          Overrides the load() method of java.util.Properties to read XML.
 void loadLegacy(java.io.InputStream in)
          Preserves the load() method of the superclass as loadLegacy().
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void skippedEntity(java.lang.String name)
           
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          This is part of the ContentHandler interface.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 void store(java.io.OutputStream out, java.lang.String header)
          Overrides the store() method of java.util.Properties to write XML.
 void store(java.io.Writer w, java.lang.String header)
          Overrides the store() method of java.util.Properties to write XML.
 org.w3c.dom.Document xmlize()
          Creates a DOM tree that represents the properties.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, propertyNames, save, setProperty
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLProperties

public XMLProperties()

XMLProperties

public XMLProperties(java.util.Properties p)
Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
This is part of the ContentHandler interface.
Specified by:
startElement in interface org.xml.sax.ContentHandler

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
This is part of the ContentHandler interface.
Specified by:
endElement in interface org.xml.sax.ContentHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
This is part of the ContentHandler interface.
Specified by:
characters in interface org.xml.sax.ContentHandler

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface org.xml.sax.ContentHandler

endDocument

public void endDocument()
Specified by:
endDocument in interface org.xml.sax.ContentHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler

skippedEntity

public void skippedEntity(java.lang.String name)
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler

load

public void load(java.io.InputStream in)
          throws java.io.IOException
Overrides the load() method of java.util.Properties to read XML.
Overrides:
load in class java.util.Properties

loadLegacy

public void loadLegacy(java.io.InputStream in)
                throws java.io.IOException
Preserves the load() method of the superclass as loadLegacy().

store

public void store(java.io.OutputStream out,
                  java.lang.String header)
           throws java.io.IOException
Overrides the store() method of java.util.Properties to write XML.
Overrides:
store in class java.util.Properties

store

public void store(java.io.Writer w,
                  java.lang.String header)
           throws java.io.IOException
Overrides the store() method of java.util.Properties to write XML.

xmlize

public org.w3c.dom.Document xmlize()
Creates a DOM tree that represents the properties.
Returns:
DOM Document