/* NativeHeapBuffer - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package jaclib.memory.heap;
import jaclib.memory.Buffer;
import jaclib.memory.Source;

public final class NativeHeapBuffer implements Buffer, Source
{
    private int anInt1046;
    public NativeHeap aNativeHeap1047;
    private int anInt1048;
    private boolean aBool1049 = true;
    
    NativeHeapBuffer(NativeHeap nativeheap, int i, int i_0_) {
	aNativeHeap1047 = nativeheap;
	anInt1048 = 1270637597 * i;
	anInt1046 = i_0_ * 1828330087;
    }
    
    private final synchronized boolean method1581() {
	return aNativeHeap1047.method984() && aBool1049;
    }
    
    public final long method110() {
	return aNativeHeap1047.getBufferAddress(-1404207563 * anInt1048);
    }
    
    public final int method51() {
	return anInt1046 * 1426088279;
    }
    
    public final synchronized void method113(byte[] is, int i, int i_1_,
					     int i_2_) {
	if (!method1581() | null == is | i < 0 | i_2_ + i > is.length
	    | i_1_ < 0 | i_1_ + i_2_ > anInt1046 * 1426088279)
	    throw new RuntimeException();
	aNativeHeap1047.put(anInt1048 * -1404207563, is, i, i_1_, i_2_);
    }
    
    public final synchronized void method1582() {
	if (method1581())
	    aNativeHeap1047.deallocateBuffer(anInt1048 * -1404207563);
	aBool1049 = false;
    }
    
    protected final synchronized void finalize() throws Throwable {
	super.finalize();
	method1582();
    }
    
    public final synchronized void method114(byte[] is, int i, int i_3_,
					     int i_4_) {
	if (!method1581() | null == is | i < 0 | i_4_ + i > is.length
	    | i_3_ < 0 | i_3_ + i_4_ > anInt1046 * 1426088279)
	    throw new RuntimeException();
	aNativeHeap1047.put(anInt1048 * -1404207563, is, i, i_3_, i_4_);
    }
    
    public final synchronized void method115(byte[] is, int i, int i_5_,
					     int i_6_) {
	if (!method1581() | null == is | i < 0 | i_6_ + i > is.length
	    | i_5_ < 0 | i_5_ + i_6_ > anInt1046 * 1426088279)
	    throw new RuntimeException();
	aNativeHeap1047.put(anInt1048 * -1404207563, is, i, i_5_, i_6_);
    }
    
    protected final synchronized void method1583() throws Throwable {
	super.finalize();
	method1582();
    }
    
    protected final synchronized void method1584() throws Throwable {
	super.finalize();
	method1582();
    }
    
    public final int method62() {
	return anInt1046 * 1426088279;
    }
    
    public final int method63() {
	return anInt1046 * 1426088279;
    }
    
    public final int method52() {
	return anInt1046 * 1426088279;
    }
    
    public final long method64() {
	return aNativeHeap1047.getBufferAddress(-1404207563 * anInt1048);
    }
    
    private final synchronized boolean method1585() {
	return aNativeHeap1047.method984() && aBool1049;
    }
    
    private final synchronized boolean method1586() {
	return aNativeHeap1047.method984() && aBool1049;
    }
    
    public final synchronized void method1587() {
	if (method1581())
	    aNativeHeap1047.deallocateBuffer(anInt1048 * -1404207563);
	aBool1049 = false;
    }
    
    public final synchronized void method1588() {
	if (method1581())
	    aNativeHeap1047.deallocateBuffer(anInt1048 * -1404207563);
	aBool1049 = false;
    }
}
