Methods Summary |
---|
public synchronized java.lang.Object | clone()
NBA cl = new NBA(type, size);
nCopyToNative(data, cl.data, size);
return cl;
|
public synchronized void | copyTo(com.sun.media.NBA nba)
if (nba.size >= size) {
nCopyToNative(data, nba.data, size);
}
|
public synchronized void | copyTo(byte[] javadata)
if (javadata.length >= size) {
nCopyToJava(data, javadata, size, atype);
}
|
protected final synchronized void | finalize()
if (data != 0)
nDeallocate(data);
data = 0;
|
public synchronized java.lang.Object | getData()
if (javaData == null) {
if (type == byte[].class)
javaData = new byte[size];
else if (type == short[].class)
javaData = new short[size];
else if (type == int[].class)
javaData = new int[size];
else if (type == long[].class)
javaData = new long[size];
else {
System.err.println("NBA: Don't handle this data type");
return null;
}
}
//Thread.dumpStack();
//System.err.println("NBA.getData");
nCopyToJava(data, javaData, size, atype);
return javaData;
|
public synchronized long | getNativeData()
return data;
|
public int | getSize()
return size;
|
private native long | nAllocate(int size)
|
private native void | nCopyToJava(long indata, java.lang.Object outdata, int size, int atype)
|
private native void | nCopyToNative(long indata, long outdata, int size)
|
private native void | nDeallocate(long data)
|