QBuffer
QBuffer
#include <QBuffer>
Public Functions
QBuffer(QObject *parent = nullptr) | |
QBuffer(QByteArray *byteArray, QObject *parent = nullptr) | |
virtual | ~QBuffer() |
QByteArray & | buffer() |
const QByteArray & | buffer() const |
const QByteArray & | data() const |
void | setBuffer(QByteArray *byteArray) |
void | setData(const QByteArray &data) |
void | setData(const char *data, int size) |
Reimplemented Public Functions
virtual bool | atEnd() const override |
virtual bool | canReadLine() const override |
virtual void | close() override |
virtual bool | open(QIODevice::OpenMode flags) override |
virtual qint64 | pos() const override |
virtual bool | seek(qint64 pos) override |
virtual qint64 | size() const override |
QBuffer buffer; char ch; buffer.open(QBuffer::ReadWrite); buffer.write("Qt rocks!"); buffer.seek(0); buffer.getChar(&ch); // ch == 'Q' buffer.getChar(&ch); // ch == 't' buffer.getChar(&ch); // ch == ' ' buffer.getChar(&ch); // ch == 'r'
######################
QQ 3087438119