//Auto-generated by kalyptus. DO NOT EDIT. package org.trinitydesktop.koala; import org.trinitydesktop.qt.Qt; import org.trinitydesktop.qt.QtSupport; import org.trinitydesktop.qt.TQIODevice; import org.trinitydesktop.qt.TQIODeviceInterface; /** Represents a file entry in a KArchive. @short A file in an archive. @see KArchive @see KArchiveDirectory */ public class KArchiveFile extends KArchiveEntry { protected KArchiveFile(Class dummy){super((Class) null);} /** Creates a new file entry. @param archive the entries archive @param name the name of the entry @param access the permissions in unix format @param date the date (in seconds since 1970) @param user the user that owns the entry @param group the group that owns the entry @param symlink the symlink, or null @param pos the position of the file in the directory @param size the size of the file @short Creates a new file entry. */ public KArchiveFile(KArchive archive, String name, int access, int date, String user, String group, String symlink, int pos, int size) { super((Class) null); newKArchiveFile(archive,name,access,date,user,group,symlink,pos,size); } private native void newKArchiveFile(KArchive archive, String name, int access, int date, String user, String group, String symlink, int pos, int size); /** Position of the data in the [uncompressed] archive. @return the position of the file @short Position of the data in the [uncompressed] archive. */ public native int position(); /** Size of the data. @return the size of the file @short Size of the data. */ public native int size(); /** Set size of data, usually after writing the file. @param s the new size of the file @short Set size of data, usually after writing the file. */ public native void setSize(int s); /** Returns the data of the file. Call data() with care (only once per file), this data isn't cached. @return the content of this file. @short Returns the data of the file. */ public native byte[] data(); /** This method returns TQIODevice (internal class: KLimitedIODevice) on top of the underlying TQIODevice. This is obviously for reading only. Note that the ownership of the device is being transferred to the caller, who will have to delete it. The returned device auto-opens (in readonly mode), no need to open it. @return the TQIODevice of the file @short This method returns TQIODevice (internal class: KLimitedIODevice) on top of the underlying TQIODevice. */ public native TQIODeviceInterface device(); /** Checks whether this entry is a file. @return true, since this entry is a file @short Checks whether this entry is a file. */ public native boolean isFile(); /** Extracts the file to the directory dest @param dest the directory to extract to @short Extracts the file to the directory dest */ public native void copyTo(String dest); /** Deletes the wrapped C++ instance */ protected native void finalize() throws InternalError; /** Delete the wrapped C++ instance ahead of finalize() */ public native void dispose(); /** Has the wrapped C++ instance been deleted? */ public native boolean isDisposed(); }