//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;
import org.kde.qt.QIODevice;
import org.kde.qt.QIODeviceInterface;

/**

 KAr is a class for reading archives in ar format. Writing
 is not supported.
		@author Laurence Anderson <l.d.anderson@warwick.ac.uk>

		@short A class for reading ar archives.

*/
public class KAr extends KArchive  {
	protected KAr(Class dummy){super((Class) null);}
	/**	
		 Creates an instance that operates on the given filename.
			@param filename is a local path (e.g. "/home/holger/myfile.ar")
		     		@short    Creates an instance that operates on the given filename.
	*/
	public KAr(String filename) {
		super((Class) null);
		newKAr(filename);
	}
	private native void newKAr(String filename);
	/**	
		 Creates an instance that operates on the given device.
		 The device can be compressed (KFilterDev) or not (QFile, etc.).
			@param dev the device to read from
		     		@short    Creates an instance that operates on the given device.
	*/
	public KAr(QIODeviceInterface dev) {
		super((Class) null);
		newKAr(dev);
	}
	private native void newKAr(QIODeviceInterface dev);
	/**	
		 The name of the ar file, as passed to the constructor.
				@return the filename. Null if you used the QIODevice constructor
     
		@short    The name of the ar file, as passed to the constructor.
	*/
	public native String fileName();
	public native boolean prepareWriting(String name, String user, String group, int size);
	public native boolean doneWriting(int size);
	public native boolean writeDir(String name, String user, String group);
	/**	
		 Opens the archive for reading.
		 Parses the directory listing of the archive
		 and creates the KArchiveDirectory/KArchiveFile entries.
			     		@short    Opens the archive for reading.
	*/
	protected native boolean openArchive(int mode);
	protected native boolean closeArchive();
	/** 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();
}
