com.ximpleware
Class ElementFragmentNs

java.lang.Object
  extended by com.ximpleware.ElementFragmentNs

public class ElementFragmentNs
extends java.lang.Object

ElementFragmentNs represents a name-space compensated element fragment


Method Summary
 long getOffsetLen()
          Get the long encoding the len and offset of uncompensated element fragment
 int getSize()
          getSize gets the byte length of ns compensated fragment in its source encoding format
 int getSize(int dest_encoding)
          This method returns the size of the transcoded byte representation of the ns compensated element fragment
 byte[] toBytes()
          Return a byte array of an element with namespace compensation in its orginal encoding format
 byte[] toBytes(int dest_encoding)
          Transcode the ElementFragmentNS object to a byte array according to the destination encoding format
 void writeToOutputStream(java.io.OutputStream ost)
          Write ns compensated fragments (bytes in original encoding format) to outputstream
 void writeToOutputStream(java.io.OutputStream ost, int dest_encoding)
          Write the transcode byte representation of an ns-compensated element fragment to the output stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOffsetLen

public final long getOffsetLen()
Get the long encoding the len and offset of uncompensated element fragment

Returns:

getSize

public final int getSize()
getSize gets the byte length of ns compensated fragment in its source encoding format

Returns:
the byte length of ns compensated fragment in its source encoding format

getSize

public final int getSize(int dest_encoding)
                  throws com.ximpleware.TranscodeException
This method returns the size of the transcoded byte representation of the ns compensated element fragment

Parameters:
dest_encoding -
Returns:
Throws:
TranscodeException

toBytes

public final byte[] toBytes()
Return a byte array of an element with namespace compensation in its orginal encoding format

Returns:

toBytes

public final byte[] toBytes(int dest_encoding)
                     throws com.ximpleware.TranscodeException
Transcode the ElementFragmentNS object to a byte array according to the destination encoding format

Parameters:
encoding -
Returns:
Throws:
com.ximpleware.TranscodeException

writeToOutputStream

public final void writeToOutputStream(java.io.OutputStream ost)
                               throws java.io.IOException
Write ns compensated fragments (bytes in original encoding format) to outputstream

Parameters:
ost -
Throws:
java.io.IOException

writeToOutputStream

public final void writeToOutputStream(java.io.OutputStream ost,
                                      int dest_encoding)
                               throws java.io.IOException,
                                      com.ximpleware.TranscodeException
Write the transcode byte representation of an ns-compensated element fragment to the output stream

Parameters:
ost -
dest_encoding -
Throws:
java.io.IOException
TranscodeException