/***************************************************************************
                          cbytearray.h  -  description
                             -------------------
    begin                : Fri Mar 22 2002
    copyright            : (C) 2002 by Mathias Küster
    email                : mathen@ketelhot.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef _CBYTEARRAY_H_
#define _CBYTEARRAY_H_

/**
  *@author Mathias Küster
  */

#include <dclib/dcos.h>

class DLL_EXPORT CByteArray {
public:
	/** */
	CByteArray();
	/** */
	~CByteArray();

	/** */
	void SetSize( long size );
	/** */
	void Append( const unsigned char * b, long len );
	/** */
	void Append( const char * b, long len ) { Append( (const unsigned char*)b, len ); };
	/** */
	unsigned char * Data();
	/** */
	long Size() const;
private:
	/** */
	unsigned char *pData;
	/** */
	long lBSize;
	/** */
	long lSize;
};

/** */
inline unsigned char * CByteArray::Data()
{ return pData; };
/** */
inline long CByteArray::Size() const
{ return lSize; };

#endif

