@Namespace(value="tensorflow") @Properties(inherit=tensorflow.class) public class RandomAccessFile extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
RandomAccessFile(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Status |
Name(BytePointer result)
\brief Returns the name of the file.
|
Status |
Read(long offset,
long n,
BytePointer result,
byte[] scratch) |
Status |
Read(long offset,
long n,
BytePointer result,
ByteBuffer scratch) |
Status |
Read(long offset,
long n,
BytePointer result,
BytePointer scratch)
\brief Reads up to
n bytes from the file starting at offset . |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public RandomAccessFile(Pointer p)
Pointer(Pointer)
.@ByVal public Status Name(@tensorflow.StringPiece @Cast(value={"char*","StringPiece*"}) BytePointer result)
@ByVal public Status Read(@Cast(value="tensorflow::uint64") long offset, @Cast(value="size_t") long n, @tensorflow.StringPiece @Cast(value={"char*","StringPiece*"}) BytePointer result, @Cast(value="char*") BytePointer scratch)
n
bytes from the file starting at offset
.
scratch[0..n-1]
may be written by this routine. Sets *result
to the data that was read (including if fewer than n
bytes were
successfully read). May set *result
to point at data in
scratch[0..n-1]
, so scratch[0..n-1]
must be live when
*result
is used.
On OK returned status: n
bytes have been stored in *result
.
On non-OK returned status: [0..n]
bytes have been stored in *result
.
Returns OUT_OF_RANGE
if fewer than n bytes were stored in *result
because of EOF.
Safe for concurrent use by multiple threads.@ByVal public Status Read(@Cast(value="tensorflow::uint64") long offset, @Cast(value="size_t") long n, @tensorflow.StringPiece @Cast(value={"char*","StringPiece*"}) BytePointer result, @Cast(value="char*") ByteBuffer scratch)
Copyright © 2022. All rights reserved.