com.wm.app.tn.doc
Class BizDocContentUtil

java.lang.Object
  extended by com.wm.app.tn.doc.BizDocContentUtil

public class BizDocContentUtil
extends java.lang.Object


Field Summary
static java.lang.String GETAS_BYTES
           
static java.lang.String GETAS_STREAM
           
 
Constructor Summary
BizDocContentUtil()
           
 
Method Summary
static java.lang.Object getContentPartData(BizDocEnvelope bizdoc, java.lang.String partName, java.lang.String getAs, int startIndex, int byteCount)
          Get content of a content part
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GETAS_BYTES

public static final java.lang.String GETAS_BYTES
See Also:
Constant Field Values

GETAS_STREAM

public static final java.lang.String GETAS_STREAM
See Also:
Constant Field Values
Constructor Detail

BizDocContentUtil

public BizDocContentUtil()
Method Detail

getContentPartData

public static java.lang.Object getContentPartData(BizDocEnvelope bizdoc,
                                                  java.lang.String partName,
                                                  java.lang.String getAs,
                                                  int startIndex,
                                                  int byteCount)
                                           throws EXMLException
Get content of a content part

Parameters:
bizdoc - the BizDocEnvelope from which the part's content to be extracted
partName - the name of the content part
getAs - the mode the content to be returned ("bytes", "stream")
startIndex - if the getAs is specified as "bytes", this specifies the index of content to start reading from indexing starts from 0
byteCount - if getAs is specified as "bytes", this specifies the the number of bytes to read from the startIndex
Returns:
partContent returns java Object, if getAs is "bytes", partContent will be an instance of "byte[]" if getAs is "stream", partContent will be an instance of "InputStream"
Throws:
EXMLException