org.kde.koala
public class KFilterDev extends QIODevice
UNKNOWN: A class for reading and writing compressed data onto a device (e.
Constructor Summary | |
---|---|
protected | KFilterDev(Class dummy) |
KFilterDev(KFilterBase filter, boolean autoDeleteFilterBase)
Constructs a KFilterDev for a given filter (e.g. gzip, bzip2 etc.). | |
KFilterDev(KFilterBase filter) |
Method Summary | |
---|---|
long | at() |
boolean | at(long arg1)
That one can be quite slow, when going back. |
boolean | atEnd() |
void | close()
Close after reading or writing.
|
static QIODeviceInterface | device(QIODeviceInterface inDevice, String mimetype)
Creates an i/o device that is able to read from the QIODevice inDevice ,
whether the data is compressed or not. |
static QIODeviceInterface | device(QIODeviceInterface inDevice, String mimetype, boolean autoDeleteInDevice)
Creates an i/o device that is able to read from the QIODevice inDevice ,
whether the data is compressed or not. |
static QIODeviceInterface | deviceForFile(String fileName, String mimetype, boolean forceFilter)
Creates an i/o device that is able to read from fileName ,
whether it's compressed or not. |
static QIODeviceInterface | deviceForFile(String fileName, String mimetype) |
static QIODeviceInterface | deviceForFile(String fileName) |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
void | flush() |
int | getch() |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
boolean | open(int mode)
Open for reading or writing.
|
int | putch(int arg1) |
long | readBlock(StringBuffer data, long maxlen) |
void | setOrigFileName(String fileName)
For writing gzip compressed files only:
set the name of the original file, to be used in the gzip header. |
void | setSkipHeaders()
Call this let this device skip the gzip headers when reading/writing.
|
long | size() |
int | ungetch(int arg1) |
long | writeBlock(String data, long len) |
Parameters: filter the KFilterBase to use autoDeleteFilterBase when true this object will become the
owner of filter.
UNKNOWN: Constructs a KFilterDev for a given filter (e.
UNKNOWN: That one can be quite slow, when going back.
UNKNOWN: Close after reading or writing.
inDevice
,
whether the data is compressed or not. Available compression filters
(gzip/bzip2 etc.) will automatically be used.
The compression filter to be used is determined mimetype
.
Pass "application/x-gzip" or "application/x-bzip2"
to use the corresponding decompression filter.
Warning: application/x-bzip2 may not be available.
In that case 0 will be returned !
The returned QIODevice has to be deleted after using.Parameters: inDevice input device, becomes owned by this device! Automatically deleted! mimetype the mime type for the filter
Returns: a QIODevice that filters the original stream. Must be deleted after using
UNKNOWN: Creates an i/o device that is able to read from the QIODevice inDevice
, whether the data is compressed or not.
inDevice
,
whether the data is compressed or not. Available compression filters
(gzip/bzip2 etc.) will automatically be used.
The compression filter to be used is determined mimetype
.
Pass "application/x-gzip" or "application/x-bzip2"
to use the corresponding decompression filter.
Warning: application/x-bzip2 may not be available.
In that case 0 will be returned !
The returned QIODevice has to be deleted after using.Parameters: inDevice input device. Won't be deleted if autoDeleteInDevice
= false mimetype the mime type for the filter autoDeleteInDevice if true, inDevice
will be deleted automatically
Returns: a QIODevice that filters the original stream. Must be deleted after using
UNKNOWN: Creates an i/o device that is able to read from the QIODevice inDevice
, whether the data is compressed or not.
fileName
,
whether it's compressed or not. Available compression filters
(gzip/bzip2 etc.) will automatically be used.
The compression filter to be used is determined from the fileName
if mimetype
is empty. Pass "application/x-gzip" or "application/x-bzip2"
to force the corresponding decompression filter, if available.
Warning: application/x-bzip2 may not be available.
In that case a QFile opened on the compressed data will be returned !
Use KFilterBase.findFilterByMimeType and code similar to what
deviceForFile is doing, to better control what's happening.
The returned QIODevice has to be deleted after using.Parameters: fileName the name of the file to filter mimetype the mime type of the file to filter, or null if unknown forceFilter if true, the function will either find a compression filter, or return 0. If false, it will always return a QIODevice. If no filter is available it will return a simple QFile. This can be useful if the file is usable without a filter.
Returns: if a filter has been found, the QIODevice for the filter. If the
filter does not exist, the return value depends on forceFilter.
The returned QIODevice has to be deleted after using.
UNKNOWN: Creates an i/o device that is able to read from fileName
, whether it's compressed or not.
UNKNOWN: Open for reading or writing.
Parameters: fileName the name of the original file
UNKNOWN: For writing gzip compressed files only: set the name of the original file, to be used in the gzip header.
UNKNOWN: Call this let this device skip the gzip headers when reading/writing.