#include <QtCore/qbuffer.h>
#ifndef QBUFFER_H
class QBuffer: public QIODevice{
   /* Some contents are skipped to improve readability */
   protected: virtual qint64 readData(char* data, qint64 maxlen);
   /* ... */
};
#endif // QBUFFER_H