public static MessageBody fromBinaryData ( List < byte [ ] > binaryData ) { if ( binaryData == null || binaryData . size ( ) == 0 || binaryData . size ( ) > 1 ) { throw new IllegalArgumentException ( "Binary data is null or has more than one byte array in it." ) ; } MessageBody body = new MessageBody ( ) ; body . bodyType = MessageBodyType . BINARY ; body . valueData = null ; body . sequenceData = null ; body . binaryData = binaryData ; return body ; }
Creates a message body from a list of Data sections . Each Data section is a byte array . Please note that this version of the SDK supports only one Data section in a message . It means only a list of exactly one byte array in it is accepted as message body .