com.wm.util.coder
Class XMLCoderWrapper

java.lang.Object
  extended by com.wm.util.coder.XMLCoderWrapper

public class XMLCoderWrapper
extends java.lang.Object

This class wraps XMLCoder and IDataXMLCoder and facilitates migration to IDataXMLCoder. This class decodes XMLCoder(), XMLCoder(true) (using the UTF8 character set), and IDataXMLCoder files.

This is a temporary class for backward compatibility. You should phase out its use when you no longer have any files encoded in XMLCoder formats (new files are saved in IDataXMLCoder format).

See Also:
XMLCoder, IDataXMLCoder

Constructor Summary
XMLCoderWrapper()
          Constructs a new XMLCoderWrapper object.
 
Method Summary
 IData decode(java.io.InputStream is)
          Decodes the XML in the specified InputStream to an IData object.
 int getFileType()
          Returns the type code for this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLCoderWrapper

public XMLCoderWrapper()
Constructs a new XMLCoderWrapper object.

Method Detail

decode

public IData decode(java.io.InputStream is)
             throws java.io.IOException,
                    InvalidDatatypeException
Decodes the XML in the specified InputStream to an IData object.

Parameters:
is - An InputStream that contains the XML document that you want to decode.
Returns:
The IData object decoded from is.
Throws:
java.io.IOException - If an error occurs while reading InputStream.
InvalidDatatypeException - If the XML in InputStream cannot be decoded or it contains an unsupported object type and setIgnoreInvalid is false.
See Also:
IDataXMLCoder, XMLCoder

getFileType

public int getFileType()
Returns the type code for this class.

Returns:
An int representing the following:
  • final static int TYPE_UNKNOWN = 0;
  • final static int TYPE_XMLCODER = 1;
  • final static int TYPE_IDATAXMLCODER = 2;