Provides the http read/write access for the RemoteIo. More...
#include <basicio.hpp>
Creators | |
HttpIo (const std::string &url, size_t blockSize=1024) | |
Constructor that accepts the http URL on which IO will be performed. The constructor does not open the file, and therefore never failes. More... | |
HttpIo (HttpIo &rhs) | |
Copy constructor. | |
HttpIo & | operator= (const HttpIo &rhs) |
Assignment operator. | |
virtual | ~HttpIo () |
Default Destructor. | |
Additional Inherited Members | |
Public Types inherited from Exiv2::BasicIo | |
enum | Position { beg, cur, end } |
Seek starting positions. | |
typedef std::auto_ptr< BasicIo > | AutoPtr |
BasicIo auto_ptr type. | |
Public Member Functions inherited from Exiv2::RemoteIo | |
virtual | ~RemoteIo () |
Destructor. Releases all managed memory. | |
virtual int | open () |
Connect to the remote server, get the size of the remote file and allocate the array of blocksMap. More... | |
virtual int | close () |
Reset the IO position to the start. It does not release the data. More... | |
virtual long | write (const byte *data, long wcount) |
Not support this method. More... | |
virtual long | write (BasicIo &src) |
Write data that is read from another BasicIo instance to the remote file. More... | |
virtual int | putb (byte data) |
Not support. More... | |
virtual DataBuf | read (long rcount) |
Read data from the memory blocks. Reading starts at the current IO position and the position is advanced by the number of bytes read. If the memory blocks are not populated (False), it will connect to server and populate the data to memory blocks. More... | |
virtual long | read (byte *buf, long rcount) |
Read data from the the memory blocks. Reading starts at the current IO position and the position is advanced by the number of bytes read. If the memory blocks are not populated (!= bMemory), it will connect to server and populate the data to memory blocks. More... | |
virtual int | getb () |
Read one byte from the memory blocks. The IO position is advanced by one byte. If the memory block is not populated (!= bMemory), it will connect to server and populate the data to the memory block. More... | |
virtual void | transfer (BasicIo &src) |
Remove the contents of the file and then transfer data from the src BasicIo object into the empty file. More... | |
virtual int | seek (long offset, Position pos) |
Move the current IO position. More... | |
virtual byte * | mmap (bool=false) |
Not support. More... | |
virtual int | munmap () |
Not support. More... | |
virtual long | tell () const |
Get the current IO position. More... | |
virtual size_t | size () const |
Get the current memory buffer size in bytes. More... | |
virtual bool | isopen () const |
Returns true if the memory area is allocated. | |
virtual int | error () const |
Always returns 0. | |
virtual bool | eof () const |
Returns true if the IO position has reached the end, otherwise false. | |
virtual std::string | path () const |
Returns the URL of the file. | |
virtual void | populateFakeData () |
Mark all the bNone blocks to bKnow. This avoids allocating memory for parts of the file that contain image-date (non-metadata/pixel data) More... | |
Public Member Functions inherited from Exiv2::BasicIo | |
virtual | ~BasicIo () |
Destructor. | |
Public Attributes inherited from Exiv2::BasicIo | |
byte * | bigBlock_ |
this is allocated and populated by mmap() | |
Protected Member Functions inherited from Exiv2::RemoteIo | |
RemoteIo () | |
Default Constructor. | |
Protected Member Functions inherited from Exiv2::BasicIo | |
BasicIo () | |
Default Constructor. | |
Protected Attributes inherited from Exiv2::RemoteIo | |
Impl * | p_ |
Pointer to implementation. | |
Provides the http read/write access for the RemoteIo.
Exiv2::HttpIo::HttpIo | ( | const std::string & | url, |
size_t | blockSize = 1024 |
||
) |
Constructor that accepts the http URL on which IO will be performed. The constructor does not open the file, and therefore never failes.
url | The full path of url |
blockSize | the size of the memory block. The file content is divided into the memory blocks. These blocks are populated on demand from the server, so it avoids copying the complete file. |