@Namespace(value="arrow::io") @NoOffset @Properties(inherit=arrow.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 |
|---|---|
InputStream |
asInputStream() |
static InputStream |
asInputStream(RandomAccessFile pointer) |
Seekable |
asSeekable() |
static Seekable |
asSeekable(RandomAccessFile pointer) |
LongResult |
GetSize()
\brief Return the total file size in bytes.
|
static InputStream |
GetStream(RandomAccessFile file,
long file_offset,
long nbytes)
\brief Create an isolated InputStream that reads a segment of a
RandomAccessFile.
|
BufferResult |
ReadAt(long _position,
long nbytes)
\brief Read data from given file position.
|
LongResult |
ReadAt(long _position,
long nbytes,
Pointer out)
\brief Read data from given file position.
|
Status |
WillNeed(ReadRange ranges)
EXPERIMENTAL: Inform that the given ranges may be read soon.
|
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, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic RandomAccessFile(Pointer p)
Pointer(Pointer).public InputStream asInputStream()
@Namespace @Name(value="static_cast<arrow::io::InputStream*>") public static InputStream asInputStream(RandomAccessFile pointer)
public Seekable asSeekable()
@Namespace @Name(value="static_cast<arrow::io::Seekable*>") public static Seekable asSeekable(RandomAccessFile pointer)
@SharedPtr public static InputStream GetStream(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::io::RandomAccessFile>"}) RandomAccessFile file, @Cast(value="int64_t") long file_offset, @Cast(value="int64_t") long nbytes)
file - [in] a file instancefile_offset - [in] the starting position in the filenbytes - [in] the extent of bytes to read. The file should have
sufficient bytes available@ByVal public LongResult GetSize()
@ByVal public LongResult ReadAt(@Cast(value="int64_t") long _position, @Cast(value="int64_t") long nbytes, Pointer out)
nbytes bytes are read. The number of bytes read is returned
(it can be less than nbytes if EOF is reached).
This method can be safely called from multiple threads concurrently.
It is unspecified whether this method updates the file position or not.
The default RandomAccessFile-provided implementation uses Seek() and Read(),
but subclasses may override it with a more efficient implementation
that doesn't depend on implicit file positioning.position - [in] Where to read bytes fromnbytes - [in] The number of bytes to readout - [out] The buffer to read bytes into@ByVal public BufferResult ReadAt(@Cast(value="int64_t") long _position, @Cast(value="int64_t") long nbytes)
nbytes bytes are read, but it can be less if EOF is reached.position - [in] Where to read bytes fromnbytes - [in] The number of bytes to read@ByVal public Status WillNeed(@StdVector ReadRange ranges)
Copyright © 2021. All rights reserved.