QDataStream & QDataStream::readBytes(char *& s, uint & l)

ストリームからバッファー s へ読み込み、ストリームへの参照を返します。
バッファー s は、new を使ってアロケートされます。破棄には、delete[] オペレーターを付けてください。
l パラメーターには、バッファーの長さをセットしてください。文字列が空の場合、l には 0 がセットされて、s には null ポインターがセットされます。
The serialization format is a quint32 length specifier first, then l bytes of data.

参考 readRawData(), writeBytes()

Reads the buffer s from the stream and returns a reference to the stream. The buffer s is allocated using new. Destroy it with the delete operator. The l parameter is set to the length of the buffer. If the string read is empty, l is set to 0 and s is set to a null pointer. The serialization format is a quint32 length specifier first, then l bytes of data.

See also readRawData() and writeBytes().