Purpose:
The DKByteArray provides a class to represent binary byte data.
Class summary:
class DKEXPORT DKByteArray { public: DKByteArray(); DKByteArray(char* data, long length); DKByteArray(const DKByteArray& byteArray); virtual ~DKByteArray(); DKByteArray& operator= (const DKByteArray& byteArray); DKBoolean operator== (const DKByteArray& byteArray) const; DKBoolean operator!= (const DKByteArray& byteArray) const; friend DKEXPORT ostream& operator << (ostream& outStream, const DKByteArray& byteArray); long length(); char* getData(); void setData(char* data, long length); };
Members:
Parameters:
data
A non null pointer to a character string which is at least one
character.
length
A long value specifying the length of the character string pointed by
data.
Parameters:
byteArray
A reference to a DKByteArray object which is to be copied.
Parameters:
data
A non null pointer to a character string which is at least one
character. The data passed in should be a valid pointer of length
greater than zero.
length
A long value specifying the length of the character string pointed by
data.
flag
Memory allocation flag. If 0, new storage is allocated for the data
and the specified data is passed in. If 1, new storage is not allocated
and assumes that the storage is allocated by the caller. The storage
allocated for data is absorbed.
Important: This storage should not be freed by the caller. This
storage is freed by this object upon desctruction.
DKByteArray& operator= (const DKByteArray& byteArray);
DKBoolean operator== (const DKByteArray& byteArray) const;
DKBoolean operator+= (const DKByteArray& byteArray);
DKBoolean operator!= (const DKByteArray& byteArray) const;
char* getData();
data
The binary data that is to be set in the byte array.
length
Length of the binary data.
void setData(char* data, long length);
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.