public class NativeArray
extends java.lang.Object
implements java.lang.AutoCloseable
| Modifier | Constructor and Description |
|---|---|
protected |
NativeArray(Context ctx,
Datatype nativeType,
SWIGTYPE_p_p_void pointer,
int nelements) |
protected |
NativeArray(Context ctx,
Datatype nativeType,
SWIGTYPE_p_void pointer,
int nelements) |
|
NativeArray(Context ctx,
int size,
java.lang.Class javaType)
Creates an empty native array using a java datatype and a provided size
|
|
NativeArray(Context ctx,
int size,
Datatype nativeType)
Creates an empty native array using a native datatype and a provided size
|
|
NativeArray(Context ctx,
java.lang.Object buffer,
java.lang.Class javaType)
Creates a native array using a java datatype.
|
|
NativeArray(Context ctx,
java.lang.Object buffer,
Datatype nativeType)
Creates a native array using a native datatype.
|
|
NativeArray(Context ctx,
java.lang.Object buffer,
Datatype nativeType,
int size)
Creates a native array using a native datatype.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Free's NativeArray off heap allocated resources
|
doubleArray |
getDoubleArray() |
floatArray |
getFloatArray() |
int16_tArray |
getInt16_tArray() |
int32_tArray |
getInt32_tArray() |
int64_tArray |
getInt64_tArray() |
int8_tArray |
getInt8_tArray() |
java.lang.Object |
getItem(int index)
Returns the item on index position of the native array.
|
java.lang.Class |
getJavaType() |
protected Datatype |
getNativeType() |
int |
getNativeTypeSize() |
long |
getNBytes() |
int |
getSize() |
uint16_tArray |
getUint16_tArray() |
uint32_tArray |
getUint32_tArray() |
int64_tArray |
getUint64_tArray() |
uint8_tArray |
getUint8_tArray() |
void |
setItem(int index,
java.lang.Object value)
Sets the item on index position of the native array.
|
long |
toCPointer() |
java.lang.Object |
toJavaArray()
Return a Java array (i.e.
|
java.lang.Object |
toJavaArray(int elements)
Return a Java array (i.e.
|
java.lang.Object |
toJavaArray(int position,
int elements)
Return a Java array (i.e.
|
SWIGTYPE_p_void |
toVoidPointer() |
public NativeArray(Context ctx, int size, Datatype nativeType) throws TileDBError
ctx - A TileDB contextsize - Number of array elementsnativeType - A TileDB datatypeTileDBError - A TileDB exceptionpublic NativeArray(Context ctx, int size, java.lang.Class javaType) throws TileDBError
ctx - A TileDB contextsize - Number of array elementsjavaType - A Java scalar type classTileDBError - A TileDB exceptionpublic NativeArray(Context ctx, java.lang.Object buffer, java.lang.Class javaType) throws TileDBError
ctx - A TileDB contextbuffer - A Java arrayjavaType - A Java scalar type classTileDBError - A TileDB exceptionpublic NativeArray(Context ctx, java.lang.Object buffer, Datatype nativeType, int size) throws TileDBError
ctx - A TileDB contextbuffer - A Java arraynativeType - A TileDB datatypesize - The array sizeTileDBError - A TileDB exceptionpublic NativeArray(Context ctx, java.lang.Object buffer, Datatype nativeType) throws TileDBError
ctx - A TileDB contextbuffer - A Java arraynativeType - A TileDB datatypeTileDBError - A TileDB exceptionprotected NativeArray(Context ctx, Datatype nativeType, SWIGTYPE_p_p_void pointer, int nelements) throws TileDBError
TileDBErrorprotected NativeArray(Context ctx, Datatype nativeType, SWIGTYPE_p_void pointer, int nelements) throws TileDBError
TileDBErrorpublic java.lang.Object getItem(int index)
throws java.lang.ArrayIndexOutOfBoundsException,
TileDBError
index - Index of array scalar to returnTileDBError - A TileDB exceptionjava.lang.ArrayIndexOutOfBoundsExceptionpublic void setItem(int index,
java.lang.Object value)
throws java.lang.ArrayIndexOutOfBoundsException,
TileDBError
index - array indexvalue - array value to set at indexTileDBError - A TileDB exceptionjava.lang.ArrayIndexOutOfBoundsExceptionpublic SWIGTYPE_p_void toVoidPointer() throws TileDBError
TileDBErrorpublic long toCPointer()
throws TileDBError
TileDBErrorpublic java.lang.Object toJavaArray()
throws TileDBError
TileDBError - A TileDB exceptionpublic java.lang.Object toJavaArray(int elements)
throws TileDBError
elements - number of elements to returnTileDBError - A TileDB exceptionpublic java.lang.Object toJavaArray(int position,
int elements)
throws TileDBError
position - position to start copying fromelements - number of elements to returnTileDBError - A TileDB exceptionprotected Datatype getNativeType()
public java.lang.Class getJavaType()
public int getSize()
public int getNativeTypeSize()
public long getNBytes()
public void close()
close in interface java.lang.AutoCloseablepublic floatArray getFloatArray()
public doubleArray getDoubleArray()
public int8_tArray getInt8_tArray()
public int16_tArray getInt16_tArray()
public int32_tArray getInt32_tArray()
public int64_tArray getInt64_tArray()
public uint8_tArray getUint8_tArray()
public uint16_tArray getUint16_tArray()
public uint32_tArray getUint32_tArray()
public int64_tArray getUint64_tArray()