public final class NBuffer extends NObject
NObject.FromHandle, NObject.NObjectCallback, NObject.NObjectPropertyChangedCallbackchangedCallback, changingCallback, FLAG_REF_RET, propertyChangedCallback, stateChangedCallback| Constructor and Description |
|---|
NBuffer(byte[] array)
Initializes a new instance of the NBuffer class.
|
NBuffer(byte[] array,
int arrayOffset,
int length)
Initializes a new instance of the NBuffer class.
|
NBuffer(ByteBuffer buffer)
Initializes a new instance of the NBuffer class.
|
NBuffer(long size)
Initializes a new instance of the NBuffer class.
|
NBuffer(NBuffer srcBuffer,
long offset,
long size)
Initializes a new instance of the NBuffer class.
|
NBuffer(com.sun.jna.Pointer ptr,
long size)
Initializes a new instance of the NBuffer class.
|
NBuffer(com.sun.jna.Pointer ptr,
long size,
boolean ownsPtr)
Initializes a new instance of the NBuffer class.
|
NBuffer(com.sun.jna.Pointer ptr,
long size,
NMemoryType ptrType)
Initializes a new instance of the NBuffer class.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
asByteBuffer()
Returns the current buffer as a byte buffer object.
|
void |
copy(NBuffer srcBuffer,
long srcOffset,
NBuffer dstBuffer,
long dstOffset,
long size)
Copies data into current NBuffer from a different NBuffer with specified offsets into both buffers and specified size.
|
void |
copyFrom(ByteBuffer srcBuffer,
long offset)
Copies data into current NBuffer from a different NBuffer with specified offsets into current NBuffer.
|
void |
copyFrom(com.sun.jna.Pointer pSrcBuffer,
long srcBufferSize,
long offset)
Copies data into current NBuffer from a different NBuffer with specified offsets into current NBuffer and specified size of the source NBuffer.
|
void |
copyTo(ByteBuffer dstBuffer)
Reads the bytes from the current NBuffer and writes them to another buffer.
|
void |
copyTo(long offset,
ByteBuffer dstBuffer,
long size)
Reads the bytes from the current buffer with offset and writes them to another buffer, with specified size.
|
void |
copyTo(long offset,
com.sun.jna.Pointer pDstBuffer,
long dstBufferSize,
long size)
Reads the bytes from the current buffer with offset and writes them to another buffer, indicated by a pointer, with specified size.
|
void |
copyTo(NBuffer dstBuffer,
long dstOffset)
Reads the bytes from the current NBuffer and writes them to another stream, using a specified offset.
|
void |
copyTo(com.sun.jna.Pointer pDstBuffer,
long dstBufferSize)
Reads the bytes from the current NBuffer and writes them to another buffer, indicated by a pointer, using a specified buffer size.
|
static NBuffer |
fromArray(byte[] array) |
static NBuffer |
fromByteBuffer(ByteBuffer buffer)
Creates a new NBuffer from another buffer.
|
static NBuffer |
getEmpty()
Gets an empty buffer.
|
static NType |
nativeTypeOf()
Retrieves the native type for the enclosing class.
|
com.sun.jna.Pointer |
ptr()
Gets a representation of NBuffer pointer.
|
long |
size()
Gets the length of NBuffer.
|
byte[] |
toByteArray() |
addListener, addPropertyChangeListener, captureProperties, claimHandle, clone, compareTo, copyProperties, dispose, disposeArray, equals, fromHandle, fromHandle, fromObject, getFlags, getHandle, getNativeType, getOwner, getProperty, getProperty, getSize, getSize, getSizeMany, getSizeMany, hashCode, invoke, invoke, invoke, isDisposed, nObjectCallbackNativeTypeOf, nObjectPropertyChangedCallbackNativeTypeOf, ref, removeListener, removePropertyChangeListener, reset, resetProperty, save, save, save, save, save, save, save, save, save, save, save, save, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, setFlags, setProperty, setProperty, toHandle, toObject, toString, toString, unref, unrefArray, unrefElementscheck, dispose, finalizepublic NBuffer(long size)
size - Size of a buffer.public NBuffer(com.sun.jna.Pointer ptr,
long size)
ptr - A pointer to buffer.size - Size of a buffer.public NBuffer(com.sun.jna.Pointer ptr,
long size,
boolean ownsPtr)
ptr - A pointer to buffer.size - Size of a buffer.ownsPtr - true if the buffer owns the pointer; else false.public NBuffer(com.sun.jna.Pointer ptr,
long size,
NMemoryType ptrType)
ptr - A pointer to buffer.size - Size of a buffer.ptrType - Type of memory location the pointer points at.public NBuffer(byte[] array)
array - An array of bytes.public NBuffer(byte[] array,
int arrayOffset,
int length)
array - An array of bytes.arrayOffset - A zero-based offset into the array.length - Length of the array.public NBuffer(ByteBuffer buffer)
buffer - Source ByteBuffer.public NBuffer(NBuffer srcBuffer, long offset, long size)
srcBuffer - Source NBuffer.offset - A zero-based offset into the array.size - Size of the NBuffer.public static NType nativeTypeOf()
public static NBuffer fromByteBuffer(ByteBuffer buffer)
buffer - The source buffer.public static NBuffer fromArray(byte[] array)
public static NBuffer getEmpty()
public void copy(NBuffer srcBuffer, long srcOffset, NBuffer dstBuffer, long dstOffset, long size)
srcBuffer - The source NBuffer.srcOffset - The zero-based byte offset into the source NBuffer.dstBuffer - The destination NBuffer.dstOffset - The zero-based byte offset into the destination NBuffer.size - The positive NInt32 value greater than 0 indicating the source NBuffer size in bytes.public void copyTo(NBuffer dstBuffer, long dstOffset)
dstBuffer - The destination buffer.dstOffset - The zero-based byte offset into the destination NBuffer.public void copyTo(com.sun.jna.Pointer pDstBuffer,
long dstBufferSize)
pDstBuffer - A pointer to the destination buffer.dstBufferSize - The positive NInt32 value greater than 0 indicating the destination buffer size in bytes.public void copyTo(ByteBuffer dstBuffer)
dstBuffer - The destination buffer.public void copyTo(long offset,
com.sun.jna.Pointer pDstBuffer,
long dstBufferSize,
long size)
offset - A zero-based offset into the current buffer.pDstBuffer - A pointer to the destination buffer.dstBufferSize - Size of the destination buffer.size - Size of the current buffer.public void copyTo(long offset,
ByteBuffer dstBuffer,
long size)
offset - A zero-based offset into the current buffer.dstBuffer - A pointer to the destination buffer.size - Size of the destination buffer.public void copyFrom(com.sun.jna.Pointer pSrcBuffer,
long srcBufferSize,
long offset)
pSrcBuffer - srcBufferSize - offset - A zero-based offset into the current buffer.public void copyFrom(ByteBuffer srcBuffer, long offset)
srcBuffer - The source buffer.offset - zero-based offset into the current buffer.public com.sun.jna.Pointer ptr()
public long size()
public ByteBuffer asByteBuffer()
public byte[] toByteArray()
Copyright © 2016 Neurotechnology. All rights reserved.