ContentContainer Objects
Defines the functionality associated with a content container. A content container is used to hold objects (typically generated as a result of executing a stream) which are stored as part of a node or output object.
c.getContent() : object
Returns the content. The return value will either be a string if the content format is
ContentFormat.UTF8 or a byte array if the content format is
ContentFormat.BINARY. An empty container will return None.
c.getContentAsBinary() : byte[]
Returns the binary content if the content format is ContentFormat.BINARY or
None otherwise.
c.getContentAsUTF8() : string
Returns the UTF8 content if the content format is ContentFormat.UTF8 or
None otherwise.
c.getContentFormat() : ContentFormat
Returns the format used to store the component's content. An empty container will return
None.
c.getName() : string
Returns the name of this container.
c.getTypeID() : string
Returns the ID of the container type declaration.
c.isEmpty() : boolean
Returns true if this container is empty; that is, it has no content associated with it.
c.readContainer(inputStream, contentFormat)
inputStream (InputStream) :
contentFormat (ContentFormat) : the content format to be used for storing the
input
Reads the container from the specified input stream. The input stream is read as a byte array. If
the content format is ContentFormat.BINARY then the byte array is stored as-is. If
the content format is ContentFormat.UTF8 then the byte array is encoded as a UTF-8
string.
Exceptions:
java.io.IOException : if the implementing code throws an IOException.
c.writeContainer(outputStream)
outputStream (OutputStream) : the output stream
Writes the container to the specified output stream.
Exceptions:
java.io.IOException : if the implementing code throws an IOException.