/* NativeHeap - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package jaclib.memory.heap;

public final class NativeHeap
{
    long peer;
    private int anInt1100;
    private boolean aBool1101;
    
    public NativeHeap(int i) {
	anInt1100 = i * 965454199;
	allocateHeap(anInt1100 * -656670649);
	aBool1101 = true;
    }
    
    synchronized boolean method1208() {
	return aBool1101;
    }
    
    public NativeHeapBuffer method1209(int i, boolean bool) {
	if (!aBool1101)
	    throw new IllegalStateException();
	return new NativeHeapBuffer(this, allocateBuffer(i, bool), i);
    }
    
    public synchronized void method1210() {
	if (aBool1101)
	    deallocateHeap();
	aBool1101 = false;
    }
    
    private native void allocateHeap(int i);
    
    private native void deallocateHeap();
    
    synchronized native int allocateBuffer(int i, boolean bool);
    
    synchronized native long getBufferAddress(int i);
    
    synchronized native void get(int i, byte[] is, int i_0_, int i_1_,
				 int i_2_);
    
    synchronized native void put(int i, byte[] is, int i_3_, int i_4_,
				 int i_5_);
    
    synchronized native void deallocateBuffer(int i);
    
    public synchronized native void copy(long l, long l_6_, int i);
    
    protected synchronized void finalize() throws Throwable {
	super.finalize();
	method1210();
    }
    
    protected synchronized void method1211() throws Throwable {
	super.finalize();
	method1210();
    }
    
    protected synchronized void method1212() throws Throwable {
	super.finalize();
	method1210();
    }
    
    public synchronized void method1213() {
	if (aBool1101)
	    deallocateHeap();
	aBool1101 = false;
    }
}
