[Solved] How to read & write binary file from internet?
zither last edited by
I try to read & write binary file from internet using the following code
write << reply->readAll();
But, it add 4 extra bytes at the header of .exe file.
I try to use QDataStream::writeRawData ( const char * s, int len )
But how can I know the size of file from QNetworkReply *reply?
Thanks to all
koahnig last edited by
QNetworkReply inherits from QIODevice "size":http://doc.qt.nokia.com/4.7/qiodevice.html#size That is what you are looking for. If this is not sufficient, you need to handle externally.