public interface IXmlDocument
Modifier and Type | Method and Description |
---|---|
IXpathResult |
execute(IXPathEvaluator xpath,
boolean writable)
This method evaluates an XPATH using any available representation of the XML document.
|
boolean |
fitsInMemory()
indicates whether the documents fits in memory.
|
byte[] |
getBytes()
Returns the bytes of the message if they can all fit in memory.
|
byte[] |
getBytes(boolean bytesMustMatchDOM)
This method returns the text representation of the XML document as a byte array.
|
byte[] |
getBytesIfAllInMemory(boolean throwEx)
Returns the bytes of the message if they can all fit in memory.
|
byte[] |
getBytesInMemory()
Returns the bytes of the message that can fit in memory.
|
org.w3c.dom.Document |
getDOM(boolean writable)
This method returns XML document as a DOM representation.
|
java.lang.String |
getEncoding()
Returns the encoding of the document.
|
java.lang.Object |
getMonitor()
This method returns the object on which client code can synchronize to maintain the integrity of this
IXmlDocument.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getScratchPad()
This method returns a
map that client code can use to cache information along with
this IXmlDocument. |
boolean |
hasBytes()
This method returns
true if the byte array representation is already available without
requiring extra computations. |
boolean |
hasData()
This method returns
true if this instance has data. |
boolean |
hasDOM()
This method returns
true if the DOM representation is already available without requiring
extra computations. |
boolean |
hasDTM()
This method returns
true if the XPATH engine is already initialized and ready for computing
XPATH expressions. |
void |
reset(byte[] bytes)
This method flushes out the cache information of this XML document, and re-initializes itself using
the passed array of bytes.
|
void |
reset(org.w3c.dom.Document doc)
This method flushes out the cache information of this XML document, and re-initializes itself using
the passed document.
|
java.lang.String getEncoding() throws java.lang.Exception
java.lang.Exception
byte[] getBytesInMemory() throws java.lang.Exception
java.lang.Exception
byte[] getBytesIfAllInMemory(boolean throwEx) throws java.lang.Exception
throwEx
- whether to throw an exception if all the bytes of the message cannot be in memory.throwEx
is false, otherwise throws an exception.java.lang.Exception
byte[] getBytes() throws java.lang.Exception
java.lang.Exception
byte[] getBytes(boolean bytesMustMatchDOM) throws java.lang.Exception
java.lang.Exception
org.w3c.dom.Document getDOM(boolean writable) throws java.lang.Exception
writable
- true
if the caller intends on making modifications to the DOM that is
returned. If false
, the DOM should be considered to be read-only (under
some circumstances, this will be enforced). Calling getDOM(false)
and then modifying the DOM can lead to unpredictable results.java.lang.Exception
IXpathResult execute(IXPathEvaluator xpath, boolean writable) throws java.lang.Exception
writable
- true
if the caller wants to have back DOM nodes that it can modify.
If you do not need to modify the DOM nodes returned by evaluating the XPATH, it is
recommended to pass in false
as building a read-only DOM is faster.java.lang.Exception
boolean hasBytes()
true
if the byte array representation is already available without
requiring extra computations.boolean hasDOM()
true
if the DOM representation is already available without requiring
extra computations.boolean hasDTM()
true
if the XPATH engine is already initialized and ready for computing
XPATH expressions.boolean hasData()
true
if this instance has data.void reset(byte[] bytes)
hasBytes()
returns true
hasDOM()
returns false
hasDTM()
returns false
getScratchPad()
returns a brand new map
void reset(org.w3c.dom.Document doc)
hasBytes()
returns false
hasDOM()
returns true
hasDTM()
returns false
getScratchPad()
returns a brand new map
boolean fitsInMemory()
java.util.Map<java.lang.Object,java.lang.Object> getScratchPad()
map
that client code can use to cache information along with
this IXmlDocument.java.lang.Object getMonitor()
reset(byte[])
.