HDK
|
Read data from an uploaded file. More...
#include <NET_HTTPUploadedFile.h>
Public Member Functions | |
IStream (NET_HTTPUploadedFile &ufile) | |
~IStream () | |
bool | read (UT_WorkBuffer &data) |
bool | read (std::string &data) |
int64 | readNextChunk (int64 chunk_size, UT_WorkBuffer &data) |
int64 | readNextChunk (int64 chunk_size, std::string &data) |
void | close () |
Public Attributes | |
NET_HTTPUploadedFile & | myFile |
Read data from an uploaded file.
Definition at line 109 of file NET_HTTPUploadedFile.h.
NET_HTTPUploadedFile::IStream::IStream | ( | NET_HTTPUploadedFile & | ufile | ) |
NET_HTTPUploadedFile::IStream::~IStream | ( | ) |
void NET_HTTPUploadedFile::IStream::close | ( | ) |
bool NET_HTTPUploadedFile::IStream::read | ( | UT_WorkBuffer & | data | ) |
Read the entire uploaded data from the file. Use chunks() if you are not certain about the total file size.
bool NET_HTTPUploadedFile::IStream::read | ( | std::string & | data | ) |
int64 NET_HTTPUploadedFile::IStream::readNextChunk | ( | int64 | chunk_size, |
UT_WorkBuffer & | data | ||
) |
Read in chunks of the file. It is often best to use this function instead of read() to avoid overwhelming your system's memory.
int64 NET_HTTPUploadedFile::IStream::readNextChunk | ( | int64 | chunk_size, |
std::string & | data | ||
) |
NET_HTTPUploadedFile& NET_HTTPUploadedFile::IStream::myFile |
Definition at line 127 of file NET_HTTPUploadedFile.h.