|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KArchive
org.kde.koala.KTar
public class KTar
A class for reading / writing (optionally compressed) tar archives. KTar allows you to read and write tar archives, including those that are compressed using gzip or bzip2.
Field Summary |
---|
Fields inherited from class org.kde.koala.KArchive |
---|
VIRTUAL_PREPARE_WRITING, VIRTUAL_WRITE_DATA, VIRTUAL_WRITE_DIR, VIRTUAL_WRITE_FILE, VIRTUAL_WRITE_SYMLINK |
Constructor Summary | |
---|---|
protected |
KTar(java.lang.Class dummy)
|
|
KTar(org.kde.qt.QIODeviceInterface dev)
Creates an instance that operates on the given device. |
|
KTar(java.lang.String filename)
|
|
KTar(java.lang.String filename,
java.lang.String mimetype)
Creates an instance that operates on the given filename using the compression filter associated to given mimetype. |
Method Summary | |
---|---|
protected boolean |
closeArchive()
|
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
boolean |
doneWriting(int size)
Call doneWriting after writing the data. |
java.lang.String |
fileName()
The name of the tar file, as passed to the constructor Null if you used the QIODevice constructor. |
protected void |
finalize()
Deletes the wrapped C++ instance |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
protected boolean |
openArchive(int mode)
Opens the archive for reading. |
protected boolean |
prepareWriting_impl(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
long perm,
int atime,
int mtime,
int ctime)
|
boolean |
prepareWriting(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size)
Here's another way of writing a file into an archive: Call prepareWriting, then call writeData() as many times as wanted then call doneWriting( totalSize ). |
boolean |
prepareWriting(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
long perm,
int atime,
int mtime,
int ctime)
Here's another way of writing a file into an archive: Call prepareWriting, then call writeData() as many times as wanted then call doneWriting( totalSize ). |
void |
setOrigFileName(java.lang.String fileName)
Special function for setting the "original file name" in the gzip header, when writing a tar.gz file. |
protected boolean |
writeDir_impl(java.lang.String name,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
|
boolean |
writeDir(java.lang.String name,
java.lang.String user,
java.lang.String group)
If an archive is opened for writing then you can add new directories using this function. |
boolean |
writeDir(java.lang.String name,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
If an archive is opened for writing then you can add new directories using this function. |
protected boolean |
writeSymLink_impl(java.lang.String name,
java.lang.String target,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
|
boolean |
writeSymLink(java.lang.String name,
java.lang.String target,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
Writes a symbolic link to the archive if the archive must be opened for writing. |
Methods inherited from class org.kde.koala.KArchive |
---|
addLocalDirectory, addLocalFile, close, closeSucceeded, device, directory, isOpened, mode, open, writeData, writeFile, writeFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected KTar(java.lang.Class dummy)
public KTar(java.lang.String filename, java.lang.String mimetype)
filename
- is a local path (e.g. "/home/weis/myfile.tgz")mimetype
- "application/x-gzip" or "application/x-bzip2"
Do not use application/x-tgz or similar - you only need to
specify the compression layer ! If the mimetype is omitted, it
will be determined from the filename.public KTar(java.lang.String filename)
public KTar(org.kde.qt.QIODeviceInterface dev)
dev
- the device to read from. If the source is compressed, the
QIODevice must take care of decompressionMethod Detail |
---|
public java.lang.String fileName()
public void setOrigFileName(java.lang.String fileName)
fileName
- the original file namepublic boolean writeSymLink(java.lang.String name, java.lang.String target, java.lang.String user, java.lang.String group, long perm, int atime, int mtime, int ctime)
KArchive
writeSymLink
in class KArchive
name
- name of symbolic linktarget
- target of symbolic linkuser
- the user that owns the directorygroup
- the group that owns the directoryperm
- permissions of the directoryatime
- time the file was last accessedmtime
- modification time of the filectime
- creation time of the filepublic boolean writeDir(java.lang.String name, java.lang.String user, java.lang.String group)
KArchive
writeDir
in class KArchive
name
- the name of the directoryuser
- the user that owns the directorygroup
- the group that owns the directorypublic boolean writeDir(java.lang.String name, java.lang.String user, java.lang.String group, long perm, int atime, int mtime, int ctime)
KArchive
writeDir
in class KArchive
name
- the name of the directoryuser
- the user that owns the directorygroup
- the group that owns the directoryperm
- permissions of the directoryatime
- time the file was last accessedmtime
- modification time of the filectime
- creation time of the filepublic boolean prepareWriting(java.lang.String name, java.lang.String user, java.lang.String group, int size)
KArchive
prepareWriting
in class KArchive
name
- the name of the fileuser
- the user that owns the filegroup
- the group that owns the filesize
- the size of the filepublic boolean prepareWriting(java.lang.String name, java.lang.String user, java.lang.String group, int size, long perm, int atime, int mtime, int ctime)
KArchive
prepareWriting
in class KArchive
name
- the name of the fileuser
- the user that owns the filegroup
- the group that owns the filesize
- the size of the fileperm
- permissions of the fileatime
- time the file was last accessedmtime
- modification time of the filectime
- creation time of the filepublic boolean doneWriting(int size)
KArchive
doneWriting
in class KArchive
size
- the size of the fileKArchive.prepareWriting(java.lang.String, java.lang.String, java.lang.String, int)
protected boolean openArchive(int mode)
mode
- the mode of the fileprotected boolean closeArchive()
protected boolean prepareWriting_impl(java.lang.String name, java.lang.String user, java.lang.String group, int size, long perm, int atime, int mtime, int ctime)
protected boolean writeDir_impl(java.lang.String name, java.lang.String user, java.lang.String group, long perm, int atime, int mtime, int ctime)
protected boolean writeSymLink_impl(java.lang.String name, java.lang.String target, java.lang.String user, java.lang.String group, long perm, int atime, int mtime, int ctime)
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |