XmlManager::createMemBufInputStream

API Ref

#include <DbXml.hpp>

XmlInputStream *XmlManager::createMemBufInputStream(const char *srcDocBytes, const unsigned int byteCount, const char *const bufId, const bool adoptBuffer = false) const

XmlInputStream *XmlManager::createMemBufInputStream(const char *srcDocBytes, const unsigned int byteCount, const bool copyBuffer) const


Description: XmlManager::createMemBufInputStream

Returns a XmlInputStream to the in-memory buffer srcDocBytes. Use this input stream with XmlContainer::putDocument or XmlDocument::setContentAsXmlInputStream.

If the input stream is passed to either of these methods, it will be adopted, and deleted. If it is not passed, it is the responsibility of the user to delete the object. Note that there is no attempt to ensure that the memory referenced contains well-formed or valid XML. Exceptions may be thrown at the time that this input stream is actually read if the stream does not contain well-formed, or valid XML.

The form that takes the copyBuffer boolean parameter optionally copies the srcDocBytes buffer to an internal buffer. This method leaves the srcDocBytes buffer intact, unconditionally.

Parameters

srcDocBytes
The memory buffer containing the XML document that you want to read.
byteCount
The size of the buffer referenced by srcDocBytes.
bufId
The system ID to use for this input stream. This can be any arbitrary system ID; it is used only to satisfy the XML parser that will read this buffer.
adoptBuffer
Indicates whether the buffer should be adopted. If true, the buffer is deleted when this input stream is deleted.
copyBuffer
Make an internal copy of the input buffer referenced by srcDocBytes.

APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.