Package jnr.ffi.provider.jffi
Class AllocatedDirectMemoryIO
- java.lang.Object
-
- jnr.ffi.Pointer
-
- jnr.ffi.provider.AbstractMemoryIO
-
- jnr.ffi.provider.jffi.DirectMemoryIO
-
- jnr.ffi.provider.jffi.AllocatedDirectMemoryIO
-
class AllocatedDirectMemoryIO extends DirectMemoryIO
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBooleanallocatedprivate longsize-
Fields inherited from class jnr.ffi.provider.jffi.DirectMemoryIO
IO
-
-
Constructor Summary
Constructors Constructor Description AllocatedDirectMemoryIO(Runtime runtime, long size, boolean clear)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()booleanequals(java.lang.Object obj)protected voidfinalize()inthashCode()longsize()Gets the size of this memory object in bytes (optional operation).-
Methods inherited from class jnr.ffi.provider.jffi.DirectMemoryIO
array, arrayLength, arrayOffset, get, get, get, get, get, get, getByte, getDouble, getFloat, getInt, getLongLong, getPointer, getPointer, getShort, getString, getString, hasArray, indexOf, put, put, put, put, put, put, putByte, putDouble, putFloat, putInt, putLongLong, putPointer, putShort, putString, putZeroTerminatedByteArray, setMemory, transferFrom, transferTo
-
Methods inherited from class jnr.ffi.provider.AbstractMemoryIO
checkBounds, checkBounds, getAddress, getInt, getLong, getNativeLong, indexOf, putAddress, putAddress, putInt, putLong, putNativeLong, slice, slice
-
Methods inherited from class jnr.ffi.Pointer
address, get, getNullTerminatedPointerArray, getNullTerminatedStringArray, getRuntime, isDirect, newIntPointer, put, toString, wrap, wrap, wrap
-
-
-
-
Constructor Detail
-
AllocatedDirectMemoryIO
public AllocatedDirectMemoryIO(Runtime runtime, long size, boolean clear)
-
-
Method Detail
-
size
public long size()
Description copied from class:PointerGets the size of this memory object in bytes (optional operation).- Overrides:
sizein classDirectMemoryIO- Returns:
- the size of the memory area this
Pointerpoints to. If the size is unknown,Long.MAX_VALUEis returned}.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDirectMemoryIO
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classDirectMemoryIO
-
dispose
public final void dispose()
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-