oracle.xml.parser.v2
Class XMLDeclPI

oracle.xml.parser.v2.XMLPI
  |
  +--oracle.xml.parser.v2.XMLDeclPI

public class XMLDeclPI
extends XMLPI
implements java.io.Externalizable

This class implements the XML Decl Processing Instruction.

See Also:
ProcessingInstruction, Serialized Form

Constructor Summary
XMLDeclPI()
           
XMLDeclPI(java.lang.String version, java.lang.String encoding, java.lang.String standalone, boolean textDecl)
           
 
Method Summary
TypeMethod
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy
 java.lang.String getData()
          Returns the fully constructed string 'version=1.0 ....'
 java.lang.String getEncoding()
          Retrieves the character encoding information.
 java.lang.String getNodeValue()
          The value of this node, depending on its type; see the table above.
 java.lang.String getStandalone()
          Retrieves the standalone information.
 java.lang.String getVersion()
          Retrieves the version information.
 void readExternal(java.io.ObjectInput inArg)
          This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
 void readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext)
          This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
 void setEncoding(java.lang.String encoding)
          Sets the character encoding for output.
 boolean setStandalone(java.lang.String value)
          Sets the standalone information stored in the <?xml ...?> tag.
 void setVersion(java.lang.String version)
          Sets the version number stored in the <?xml ...?> tag.
 void writeExternal(java.io.ObjectOutput outArg)
          This method saves the state of the object by creating a binary compressed stream with information about this object.
 
Methods inherited from class oracle.xml.parser.v2.XMLPI
addText, getNodeName, getNodeType, getTarget, reportSAXEvents
 

Constructor Detail

XMLDeclPI

public XMLDeclPI()

XMLDeclPI

public XMLDeclPI(java.lang.String version,
                 java.lang.String encoding,
                 java.lang.String standalone,
                 boolean textDecl)
Method Detail

getData

public java.lang.String getData()
                         throws DOMException
Returns the fully constructed string 'version=1.0 ....'
Throws:
DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getNodeValue

public java.lang.String getNodeValue()
                              throws DOMException
Description copied from interface: Node
The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect.
Tags copied from interface: Node
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getVersion

public final java.lang.String getVersion()
Retrieves the version information.
Returns:
the version number stored in the <?xml ...?> tag.

setVersion

public final void setVersion(java.lang.String version)
Sets the version number stored in the <?xml ...?> tag.
Parameters:
version - The version information to set.

getEncoding

public final java.lang.String getEncoding()
Retrieves the character encoding information.
Returns:
the encoding information stored in the <?xml ...?> tag or the user-defined output encoding if it has been more recently set.

setEncoding

public final void setEncoding(java.lang.String encoding)
Sets the character encoding for output. Eventually it sets the ENCODING stored in the <?xml ...?> tag, but not until the document is saved. You should not call this method until the Document has been loaded.
Parameters:
encoding - The character encoding to set

getStandalone

public final java.lang.String getStandalone()
Retrieves the standalone information.
Returns:
the standalone attribute stored in the <?xml ...?> tag.

setStandalone

public final boolean setStandalone(java.lang.String value)
Sets the standalone information stored in the <?xml ...?> tag.
Parameters:
value - The attribute value ('yes' or 'no').

cloneNode

public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy
Returns:
The duplicate node.

writeExternal

public void writeExternal(java.io.ObjectOutput outArg)
                   throws java.io.IOException
This method saves the state of the object by creating a binary compressed stream with information about this object.
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class XMLPI
Parameters:
out - is the ObjectOutput stream used to write the compressed stream.
Throws:
java.io.IOException - is thrown when there is an exception while writing the compressed stream.

readExternal

public void readExternal(java.io.ObjectInput inArg)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class XMLPI
Parameters:
in - The ObjectInput stream used for reading the compressed stream
Throws:
java.io.IOException - is thrown when there is an error in reading the input stream.
java.lang.ClassNotFoundException - is thrown when the class is not found

readExternal

public void readExternal(oracle.xml.io.XMLObjectInput in,
                         oracle.xml.comp.CXMLContext cxmlContext)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
Overrides:
readExternal in class XMLPI
Parameters:
in - The XMLObjectInput stream used for reading the compressed stream
Throws:
java.io.IOException - is thrown when there is an error in reading the input stream.
java.lang.ClassNotFoundException - is thrown when the class is not found