--------------------------------------------------------------------- CLASS: ByteArray --DVM PUBLIC METHODS: ByteArray(l) - Constructor: l bytes long ByteArray(bp,l) - Constructor: copy from bp, l bytes length() - returns length error() - returns error operatorXX() - cast to BYTE_PTR , CONST_BYTE_PTR , String operator=() - assign from string or sba setLen() - dynamically set length clear() - sets len to zero, deallocates toMem() - copies to mem fromMem() - copies from mem 32-bit length array of bytes USAGE NOTES: General-purpose container for bytes. Unlike strings, can hold nulls. ---------------------------------------------------------------------- --------------------------------------------------------------------- METHOD: ByteArrayRef::length() --JKH This method sets the ByteArrayRef object's length field. ARGS: UINT32 newlength IN The value of the new length. RETURNS: Returns the old value of length. PRE-CONDS: none POST-CONDS: --The length will be set to the new value, regardless of whether it is in range. ----------------------------------------------------------------------------- NSR::UINT32 NSR::ByteArrayRef::length( UINT32 newlength ) NSR::UINT32 NSR::ByteArrayRef::length( UINT32 newlength ) --------------------------------------------------------------------- METHOD: ByteArrayRef::toMem() --JKH Copies the memory referenced by the ByteArrayRef to the specified data buffer. ARGS: BYTE_PTR buf OUT The data buffer. RETURNS: Returns True on success, False on failure. PRE-CONDS: --The ByteArrayRef is valid: its offset and length specify a valid region within the ByteArray to which the Ref refers. POST-CONDS: --Memory referenced by the ByteArrayRef will be copied to the specified data buffer. --If the ByteArrayRef is invalid, the function does nothing. ----------------------------------------------------------------------------- void NSR::String::toMem( CHAR_PTR s ) const void NSR::String::toMem( CHAR_PTR s ) const void NSR::SmallByteArray::toMem( BYTE_PTR b ) const void NSR::ByteArray::toMem( BYTE_PTR b ) const NSR::Boolean NSR::ByteArrayRef::toMem( BYTE_PTR buf ) const NSR::Boolean NSR::ByteArrayRef::toMem( BYTE_PTR buf ) const --------------------------------------------------------------------- METHOD: ByteArrayRef::fromMem() --JKH Copies from the specified data buffer to the memory referenced by the ByteArrayRef. ARGS: const BYTE_PTR buf IN The data buffer. RETURNS: Returns True on success, False on failure. PRE-CONDS: --The ByteArrayRef is valid: its offset and length specify a valid region with the ByteArray to which the Ref refers. POST-CONDS: --Memory from the specified data buffer will be copied to memory referenced by the ByteArrayRef. --If the ByteArrayRef is invalid, the function does nothing. ----------------------------------------------------------------------------- void NSR::SmallByteArray::fromMem( CONST_BYTE_PTR b ) void NSR::ByteArray::fromMem( CONST_BYTE_PTR b ) NSR::Boolean NSR::ByteArrayRef::fromMem( CONST_BYTE_PTR buf ) NSR::Boolean NSR::ByteArrayRef::fromMem( CONST_BYTE_PTR buf )