/***************************************************************************
                            QFile.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.qt;

import java.util.*;
import java.lang.Error;

public class QFile extends QIODevice  {
	protected QFile(Class dummy){super((Class) null);}

	private native void newQFile();
	public QFile() {
		super((Class) null);
		newQFile();
	}
	private native void newQFile( String name);
	public QFile( String name) {
		super((Class) null);
		newQFile( name);
	}
	protected native void finalize() throws InternalError;
	public native String name();
	public native void setName( String name);
//	public native typedef QCString( String fileName);
//	public native typedef QString( String localfileName);
	public native boolean exists();
	public native boolean remove();
	public native boolean open( int arg1);
//	public native boolean open( int arg1, FILE* arg2);
	public native boolean open( int arg1, int arg2);
	public native void close();
	public native void flush();
	public native int size();
	public native int at();
	public native boolean at( int arg1);
	public native boolean atEnd();
	public native long readBlock( StringBuffer data, long len);
	public native long writeBlock( String data, long len);
	public native long writeBlock( byte[] data);
	public native long readLine( StringBuffer data, long maxlen);
//	public native long readLine( String arg1, long maxlen);
	public native int getch();
	public native int putch( int arg1);
	public native int ungetch( int arg1);
	public native int handle();
	public static native String encodeName( String fileName);
	public static native String decodeName( String localFileName);
//	public static native void setEncodingFunction( int arg1);
//	public static native void setDecodingFunction( int arg1);
	public static native boolean exists( String fileName);
	public static native boolean remove( String fileName);
}
