indexing description: "A message used for sending a stream of uninterpreted bytes." author: "Comerge AG; JR" date: "$Date$" revision: "$Revision$" class BYTES_MESSAGE inherit MESSAGE redefine cpp_delete end create {SESSION, MESSAGE_CONSUMER} make feature -- Operations set_body_bytes (a_pointer: MANAGED_POINTER) is -- sets the bytes given to the message body. do cpp_set_body_bytes (item, a_pointer.item, a_pointer.count) end feature -- Queries get_body_bytes: MANAGED_POINTER is -- Gets the bytes that are contained in this message do create Result.make_from_pointer (cpp_get_body_bytes (item), cpp_get_body_length (item)) end feature {NONE} -- C++ Methods cpp_delete (a_object: POINTER) is -- Delete cpp object external "C++ inline use " alias "[ delete (cms::BytesMessage*)$a_object; ]" end cpp_get_body_bytes (a_object: POINTER): POINTER is -- Get Body Bytes. external "C++ inline use " alias "[ try{ const unsigned char* c_ptr = ((cms::BytesMessage*)$a_object)->getBodyBytes(); return (EIF_POINTER) c_ptr; }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_get_body_length (a_object: POINTER): INTEGER_32 is -- Get Body Bytes. external "C++ inline use " alias "[ try{ std::size_t size = ((cms::BytesMessage*)$a_object)->getBodyLength(); return (EIF_INTEGER_32) size; }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_set_body_bytes (a_object: POINTER; a_pointer: POINTER; a_length: INTEGER_32) is -- Set Body Bytes. external "C++ inline use " alias "[ try{ ((cms::BytesMessage*)$a_object)->setBodyBytes((const unsigned char *)$a_pointer, (std::size_t)$a_length); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end end