Qt Framework includes a class called QBuffer that can be used to access a QByteArray (internal QByteArray to be precise) as if it is a file. So you can use Stream readers and writers to access data in it similar to a QFile.
Here is a brief example:
qDebug() << b.size(); // 22
qDebug() << b.read(11); // “http://amin”
qDebug() << b.read(1); // “o”