@Properties(inherit=tensorflow.class) public abstract class AbstractTF_Buffer extends Pointer
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTF_Buffer.DeleteDeallocator |
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
AbstractTF_Buffer(Pointer p) |
Modifier and Type | Method and Description |
---|---|
byte[] |
copyData()
Returns a copy of the data in a Java array
|
ByteBuffer |
dataAsByteBuffer()
Returns the data of this buffer as a
ByteBuffer |
void |
delete()
Calls the deallocator, if registered, otherwise has no effect.
|
static TF_Buffer |
newBuffer()
Calls TF_NewBuffer(), and registers a deallocator.
|
static TF_Buffer |
newBufferFromString(com.google.protobuf.Message proto)
Returns {@code newBufferFromString(new BytePointer(proto.toByteArray())), or null if proto is null or empty.
|
static TF_Buffer |
newBufferFromString(Pointer proto)
Calls TF_NewBufferFromString(), and registers a deallocator.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public AbstractTF_Buffer(Pointer p)
public static TF_Buffer newBuffer()
public static TF_Buffer newBufferFromString(com.google.protobuf.Message proto)
public static TF_Buffer newBufferFromString(Pointer proto)
public byte[] copyData()
IndexOutOfBoundsException
- if too large.public ByteBuffer dataAsByteBuffer()
ByteBuffer
IndexOutOfBoundsException
- if too large.public void delete()
Copyright © 2015–2022. All rights reserved.