org.bridj
Class PointerIO<T>
java.lang.Object
org.bridj.PointerIO<T>
public abstract class PointerIO<T>
- extends Object
Helper class that knows how to read/write data from/to a Pointer
.
End users don't need to use this class directly as (Pointer
lets you work with Type
and Class
).
- Author:
- Olivier
Constructor Summary |
PointerIO(Type targetType,
int targetSize,
Class<?> typedPointerClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointerIO
public PointerIO(Type targetType,
int targetSize,
Class<?> typedPointerClass)
getArray
public Object getArray(Pointer<T> pointer,
long byteOffset,
int length)
getBuffer
public <B extends Buffer> B getBuffer(Pointer<T> pointer,
long byteOffset,
int length)
setArray
public void setArray(Pointer<T> pointer,
long byteOffset,
Object array)
castTarget
public T castTarget(long peer)
getTargetSize
public long getTargetSize()
getTargetAlignment
public long getTargetAlignment()
isTypedPointer
public boolean isTypedPointer()
getTypedPointerClass
public Class<?> getTypedPointerClass()
getTargetType
public Type getTargetType()
getPointerInstance
public static <T> PointerIO<Pointer<T>> getPointerInstance(Type target)
getPointerInstance
public static <T> PointerIO<Pointer<T>> getPointerInstance(PointerIO<T> targetIO)
getArrayInstance
public static <T> PointerIO<Pointer<T>> getArrayInstance(PointerIO<T> targetIO,
long[] dimensions,
int iDimension)
getInstance
public static <S extends StructObject> PointerIO<S> getInstance(StructIO s)
getInstance
public static <P> PointerIO<P> getInstance(Type type)
getIntInstance
public static PointerIO<Integer> getIntInstance()
getLongInstance
public static PointerIO<Long> getLongInstance()
getShortInstance
public static PointerIO<Short> getShortInstance()
getByteInstance
public static PointerIO<Byte> getByteInstance()
getCharInstance
public static PointerIO<Character> getCharInstance()
getFloatInstance
public static PointerIO<Float> getFloatInstance()
getDoubleInstance
public static PointerIO<Double> getDoubleInstance()
getBooleanInstance
public static PointerIO<Boolean> getBooleanInstance()
getCLongInstance
public static PointerIO<CLong> getCLongInstance()
getSizeTInstance
public static PointerIO<SizeT> getSizeTInstance()
getPointerInstance
public static PointerIO<Pointer> getPointerInstance()
getBufferPrimitiveInstance
public static <P> PointerIO<P> getBufferPrimitiveInstance(Buffer buffer)
getStringInstance
public static PointerIO<String> getStringInstance()
Copyright © 2009-2012. All Rights Reserved.