# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KIO::StoredTransferJob Class Reference

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. More...

`#include <jobclasses.h>`

Inheritance diagram for KIO::StoredTransferJob:

[legend]
Collaboration diagram for KIO::StoredTransferJob:

[legend]
List of all members.

## Public Member Functions

| StoredTransferJob (const KURL &url, int command, const QByteArray &packedArgs, const QByteArray &_staticData, bool showProgressInfo)
void | setData (const QByteArray &arr)
QByteArray | data () const

## 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.

Since:
  3.3

Definition at line 1034 of file jobclasses.h.

## Constructor & Destructor Documentation

StoredTransferJob::StoredTransferJob | ( | const KURL & | url,
|  | int | command,
|  | const QByteArray & | packedArgs,
|  | const QByteArray & | _staticData,
|  | bool | showProgressInfo
| ) |

Do not create a StoredTransferJob.

Use storedGet() or storedPut() instead.

Parameters:

  | url | the url to get or put
  | command | the command to issue
  | packedArgs | the arguments
  | _staticData | additional data to transmit (e.g. in a HTTP Post)
  | showProgressInfo | true to show progress information to the user

Definition at line 1331 of file job.cpp.

References QObject::connect(), data(), and KIO::TransferJob::dataReq().

## Member Function Documentation

void StoredTransferJob::setData | ( | const QByteArray & | arr | ) |

| Set data to be uploaded. This is for put jobs. Automatically called by KIO::storedPut(const QByteArray &, ...), do not call this yourself. Definition at line 1344 of file job.cpp. Referenced by KIO::storedPut().

QByteArray KIO::StoredTransferJob::data | ( |  | ) | const`[inline]`

| 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. Definition at line 1063 of file jobclasses.h. Referenced by StoredTransferJob().

The documentation for this class was generated from the following files:

- jobclasses.h
- job.cpp

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:26:10 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003