Integration Server 10.5 | Built-In Services Reference Guide | Document Folder | Summary of Elements in this Folder | pub.document:bytesToDocument
 
pub.document:bytesToDocument
WmPublic. Converts an array of bytes to a document. This service can only be used with byte arrays created by executing the pub.document:documentToBytesservice.
Input Parameters
documentBytes
Object An array of bytes (byte[]) to convert to a document.
*If documentBytes is null, the service does not return a document or an error message.
*If documentBytes is not a byte array, the service throws a service exception.
*If documentBytes is zero-length, the service produces an empty document.
Output Parameters
document
Document A document.
Usage Notes
Use this service with the pub.document:documentToBytes service, which converts a document into a byte array. You can pass the resulting byte array to the pub.document:bytesToDocument service to convert it back into the original document.
In order for the document-to-bytes-to-document conversion to work, the entire content of the document must be serializable. Every object in the document must be of a data type known to Integration Server, or it must support the java.io.Serializable interface.
Note:
If Integration Server encounters an unknown object in the document that does not support the java.io.Serializable interface, that object's value will be lost. It will be replaced with a string containing the object's class name.