| java.lang.Object org.apache.harmony.awt.nativebridge.VoidPointer
All known Subclasses: org.apache.harmony.awt.nativebridge.Int64Pointer, org.apache.harmony.awt.nativebridge.CommonStructWrapper, org.apache.harmony.awt.nativebridge.Int8Pointer, org.apache.harmony.awt.nativebridge.Int16Pointer, org.apache.harmony.awt.nativebridge.DoublePointer, org.apache.harmony.awt.nativebridge.CLongPointer, org.apache.harmony.awt.nativebridge.Int32Pointer, org.apache.harmony.awt.nativebridge.PointerPointer, org.apache.harmony.awt.nativebridge.FloatPointer,
VoidPointer | abstract public class VoidPointer (Code) | | This class represents pointer to memory for working with native functions.
It is an analogue of void* C type. Every pointed object can be direct
native object or Java object. In both cases NativeBridge provides correct
passing addresses to native functions, native address is passed as is, Java
object will be implicitly locked and address of lock will be passed to native.
NULL pointer can't be wrapped by this object, NULL is represents by Java
null value.
See Also: org.apache.harmony.misc.accessors.MemoryAccessor See Also: org.apache.harmony.misc.accessors.ArrayAccessor |
explicitlyLocked | boolean explicitlyLocked(Code) | | |
VoidPointer | VoidPointer(int size, boolean direct)(Code) | | |
VoidPointer | VoidPointer(byte[] arr, int offset, int size)(Code) | | |
VoidPointer | VoidPointer(long addr)(Code) | | |
copy | public void copy(VoidPointer src, int dstOffset, int length)(Code) | | Copies length bytes from src VoidPointer to this.
Offset in a destination is dstOffset. Starting offset in source
is always 0;
Parameters: src - source byte base Parameters: dstOffset - destination Parameters: length - |
internalLongLock | final long internalLongLock()(Code) | | Internal long lock. Used in NativeBridge wrappers for native functions.
- memory address. |
internalRelease | final void internalRelease()(Code) | | Internal release. Unlocks objects if it was implicitly locked. This
methods don't release exlicitly locked Java objects.
|
internalReleaseNoCopy | final void internalReleaseNoCopy()(Code) | | Internal release. Unlocks objects if it was implicitly locked. This
methods don't release exlicitly locked Java objects. This methods gives
a hint, that values should not be copied back to Java object. Used for
"in" parameters of functions.
|
internalShortLock | final long internalShortLock()(Code) | | Internal short lock. Used in NativeBridge wrappers for native functions.
- memory address. |
isDirect | public boolean isDirect()(Code) | | |
lock | final public long lock()(Code) | | Returns the memory address for this pointer. Performs the explicit lock
of the pointed memory.
If this object is direct pointer to native memory - returns native address,
If this object reference to Java object, then Java object is locked and
memory address for locked Java object is returned.
Explicitly locked object should be released after usage.
See Also: VoidPointer.release() See Also: VoidPointer.free() See Also: h |
longLockPointer | public long longLockPointer()(Code) | | |
release | final public void release()(Code) | | Performs the explicit release of Java object. This method does nothing
if object is direct native pointer or non-locked Java memory.
|
releaseNoCopy | final public void releaseNoCopy()(Code) | | Performs the explicit releaseNoCopy of Java object. This method does nothing
if object is direct native pointer or non-locked Java memory.
|
shortLockPointer | public long shortLockPointer()(Code) | | performs short lock
|
size | abstract public int size()(Code) | | |
unlock | public void unlock()(Code) | | |
|
|