/* 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 anInt852;
    public NativeHeap aNativeHeap853;
    private int anInt854;
    private boolean aBool855 = true;
    
    NativeHeapBuffer(NativeHeap nativeheap, int i, int i_0_) {
	aNativeHeap853 = nativeheap;
	anInt854 = -1397013171 * i;
	anInt852 = 1272008963 * i_0_;
    }
    
    private final synchronized boolean method1698() {
	return aNativeHeap853.method995() && aBool855;
    }
    
    public final long method61() {
	return aNativeHeap853.getBufferAddress(294484869 * anInt854);
    }
    
    public final int method28() {
	return anInt852 * 555000235;
    }
    
    public final synchronized void method93(byte[] is, int i, int i_1_,
					    int i_2_) {
	if (!method1698() | is == null | i < 0 | i + i_2_ > is.length
	    | i_1_ < 0 | i_1_ + i_2_ > 555000235 * anInt852)
	    throw new RuntimeException();
	aNativeHeap853.put(294484869 * anInt854, is, i, i_1_, i_2_);
    }
    
    public final synchronized void method1699() {
	if (method1698())
	    aNativeHeap853.deallocateBuffer(294484869 * anInt854);
	aBool855 = false;
    }
    
    protected final synchronized void finalize() throws Throwable {
	super.finalize();
	method1699();
    }
    
    public final synchronized void method94(byte[] is, int i, int i_3_,
					    int i_4_) {
	if (!method1698() | is == null | i < 0 | i + i_4_ > is.length
	    | i_3_ < 0 | i_3_ + i_4_ > 555000235 * anInt852)
	    throw new RuntimeException();
	aNativeHeap853.put(294484869 * anInt854, is, i, i_3_, i_4_);
    }
    
    public final synchronized void method95(byte[] is, int i, int i_5_,
					    int i_6_) {
	if (!method1698() | is == null | i < 0 | i + i_6_ > is.length
	    | i_5_ < 0 | i_5_ + i_6_ > 555000235 * anInt852)
	    throw new RuntimeException();
	aNativeHeap853.put(294484869 * anInt854, is, i, i_5_, i_6_);
    }
    
    public final synchronized void method96(byte[] is, int i, int i_7_,
					    int i_8_) {
	if (!method1698() | is == null | i < 0 | i + i_8_ > is.length
	    | i_7_ < 0 | i_7_ + i_8_ > 555000235 * anInt852)
	    throw new RuntimeException();
	aNativeHeap853.put(294484869 * anInt854, is, i, i_7_, i_8_);
    }
    
    protected final synchronized void method1700() throws Throwable {
	super.finalize();
	method1699();
    }
    
    public final int method16() {
	return anInt852 * 555000235;
    }
    
    public final int method15() {
	return anInt852 * 555000235;
    }
    
    public final int method97() {
	return anInt852 * 555000235;
    }
    
    public final int method98() {
	return anInt852 * 555000235;
    }
    
    public final long method99() {
	return aNativeHeap853.getBufferAddress(294484869 * anInt854);
    }
    
    public final long method100() {
	return aNativeHeap853.getBufferAddress(294484869 * anInt854);
    }
    
    private final synchronized boolean method1701() {
	return aNativeHeap853.method995() && aBool855;
    }
    
    private final synchronized boolean method1702() {
	return aNativeHeap853.method995() && aBool855;
    }
    
    private final synchronized boolean method1703() {
	return aNativeHeap853.method995() && aBool855;
    }
    
    public final synchronized void method1704() {
	if (method1698())
	    aNativeHeap853.deallocateBuffer(294484869 * anInt854);
	aBool855 = false;
    }
    
    public final synchronized void method1705() {
	if (method1698())
	    aNativeHeap853.deallocateBuffer(294484869 * anInt854);
	aBool855 = false;
    }
    
    public final synchronized void method1706() {
	if (method1698())
	    aNativeHeap853.deallocateBuffer(294484869 * anInt854);
	aBool855 = false;
    }
}
