93 bufferCompleteSize += bd.
size();
102 bufferCompleteSize += bd.
size();
109 bufferCompleteSize -= buffers.
first().
size();
136 qint64 originalAmount = amount;
137 char *writeDst = dst;
141 if (amount >= first.
size()) {
143 bufferCompleteSize -= first.
size();
144 amount -= first.
size();
146 writeDst += first.
size();
150 bufferCompleteSize -= amount;
151 memcpy(writeDst, first.
constData(), amount);
155 newFirstData.
resize(newFirstSize);
156 memcpy(newFirstData.
data(), first.
constData() + amount, newFirstSize);
164 return originalAmount;
177 bufferCompleteSize = 0;
211 for (
int i = 0; i < buffers.
length(); i++)
220 #endif // QBYTEDATA_H
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
char * data()
Returns a pointer to the data stored in the byte array.
The QByteArray class provides an array of bytes.
void append(QByteDataBuffer &other)
QByteArray read(qint64 amount)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void append(const QByteArray &bd)
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
T takeFirst()
Removes the first item in the list and returns it.
void prepend(const T &t)
Inserts value at the beginning of the list.
const T & at(int i) const
Returns the item at index position i in the list.
void clear()
Removes all items from the list.
T & first()
Returns a reference to the first item in the list.
const char * constData() const
Returns a pointer to the data stored in the byte array.
int length() const
This function is identical to count().
void resize(int size)
Sets the size of the byte array to size bytes.
qint64 bufferCompleteSize
void prepend(QByteArray &bd)
int size() const
Returns the number of bytes in this byte array.
qint64 read(char *dst, qint64 amount)
QByteArray & operator[](int i)
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
QList< QByteArray > buffers
qint64 bufferCount() const
qint64 byteAmount() const
void clear()
Clears the contents of the byte array and makes it empty.
QBool contains(char c) const
Returns true if the byte array contains the character ch; otherwise returns false.
qint64 sizeNextBlock() const