QByteArrayList 类

The QByteArrayList 类提供字节数组列表。 更多...

头: #include <QByteArrayList>
qmake: QT += core
Since: Qt 5.4
继承: QList

注意: 此类的所有函数 可重入 .

公共函数

QByteArray join () const
QByteArray join (const QByteArray & separator ) const
QByteArray join (char separator ) const
typedef QByteArrayListIterator
typedef QMutableByteArrayListIterator

额外继承成员

  • 3 static public members inherited from QList

详细描述

The QByteArrayList 类提供字节数组列表。

QByteArrayList is actually just a QList < QByteArray >. It is documented as a full class just for simplicity of documenting the member methods that exist only in QList < QByteArray >.

所有的 QList 's functionality also applies to QByteArrayList . For example, you can use isEmpty () 来测试列表是否为空,可以调用函数像 append (), prepend (), insert (), replace (), removeAll (), removeAt (), removeFirst (), removeLast (),和 removeOne () to modify a QByteArrayList . In addition, QByteArrayList provides several join () methods for concatenating the list into a single QByteArray .

目的对于 QByteArrayList is quite different from that of QStringList . Whereas QStringList has many methods for manipulation of elements within the list, QByteArrayList does not. Normally, QStringList should be used whenever working with a list of printable strings. QByteArrayList should be used to handle and efficiently join large blobs of binary data, as when sequentially receiving serialized data through a QIODevice .

另请参阅 QByteArray and QStringList .

成员函数文档编制

QByteArray QByteArrayList:: join () const

把所有字节数组拼接成单字节数组。

QByteArray QByteArrayList:: join (const QByteArray & separator ) const

Joins all the byte arrays into a single byte array with each element separated by the given separator .

QByteArray QByteArrayList:: join ( char separator ) const

Joins all the byte arrays into a single byte array with each element separated by the given separator .

相关非成员

typedef QByteArrayListIterator

The QByteArrayListIterator type definition provides a Java-style const iterator for QByteArrayList .

QByteArrayList provides both Java 风格迭代器 and STL 样式迭代器 . The Java-style const iterator is simply a type definition for QListIterator < QByteArray >.

另请参阅 QMutableByteArrayListIterator and QByteArrayList::const_iterator .

typedef QMutableByteArrayListIterator

The QByteArrayListIterator type definition provides a Java-style non-const iterator for QByteArrayList .

QByteArrayList provides both Java 风格迭代器 and STL 样式迭代器 . The Java-style non-const iterator is simply a type definition for QMutableListIterator < QByteArray >.

另请参阅 QByteArrayListIterator and QByteArrayList::iterator .