KIO.StoredTransferJob

KDE 4.9 PyKDE API Reference

- KDE's Python API

# StoredTransferJob Class Reference

`from PyKDE4.kio import *`

Inherits: KIO.TransferJob → KIO.SimpleJob → KIO.Job → KCompositeJob → KJob → QObject
Namespace: KIO

## Detailed Description

StoredTransferJob is a TransferJob (for downloading or uploading data) that also stores a QByteArray with the data, making it simpler to use than the standard TransferJob.

For KIO.storedGet it puts the data into the member QByteArray, so the user of this class can get hold of the whole data at once by calling data() when the result signal is emitted. You should only use StoredTransferJob to download data if you cannot process the data by chunks while it's being downloaded, since storing everything in a QByteArray can potentially require a lot of memory.

For KIO.storedPut the user of this class simply provides the bytearray from the start, and the job takes care of uploading it. You should only use StoredTransferJob to upload data if you cannot provide the in chunks while it's being uploaded, since storing everything in a QByteArray can potentially require a lot of memory.

## Methods
| __init__ (self)
QByteArray | data (self)
| setData (self, QByteArray arr)

## Method Documentation

__init__ | ( |  | self ) |

QByteArray data | ( |  | self ) |

Get hold of the downloaded data. This is for get jobs. You're supposed to call this only from the slot connected to the result() signal.

setData | ( | self, |
|  | QByteArray | arr
| ) |  |  |

Set data to be uploaded. This is for put jobs. Automatically called by KIO.storedPut(const QByteArray &, ...), do not call this yourself.