com.ibm.wbi
Interface MegObject


public interface MegObject

An object passed from one MEG to another must implement MegObject. Use of an object may allow MEGs to eliminate parsing and re-parsing of input streams when multiple MEGs understand a common object (e.g. DOM).


Method Summary
 MegObject getClone()
          returns a copy of this MegObject to preserve the data in its original state.
 java.io.InputStream getInputStream()
          provides interoperation with "old" MEGs that do not understand the MegObject and must process the data as a MegInputStream.
 java.io.Reader getReader()
          getReader provides access to the MegObject as character data rather than bytes.
 java.io.Reader getReader(java.lang.String encoding)
          getReader provides access to the MegObject as character data using the specified character encoding.
 

Method Detail

getInputStream

public java.io.InputStream getInputStream()
provides interoperation with "old" MEGs that do not understand the MegObject and must process the data as a MegInputStream.
Returns:
InputStream access to the MEG data.

getReader

public java.io.Reader getReader()
                         throws java.io.UnsupportedEncodingException,
                                com.ibm.wbi.NotCharDataException
getReader provides access to the MegObject as character data rather than bytes.
Returns:
Reader access to the MEG data.

getReader

public java.io.Reader getReader(java.lang.String encoding)
                         throws java.io.UnsupportedEncodingException,
                                com.ibm.wbi.NotCharDataException
getReader provides access to the MegObject as character data using the specified character encoding.
Parameters:
encoding - the desired character encoding.
Returns:
Reader access to the MEG data.

getClone

public MegObject getClone()
returns a copy of this MegObject to preserve the data in its original state.
Returns:
the clone