@Namespace(value="arrow::io") @NoOffset @Properties(inherit=arrow.class) public class MemoryMappedFile extends ReadWriteFileInterface
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
MemoryMappedFile(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Status |
Close() |
boolean |
closed() |
static MemoryMappedFileResult |
Create(BytePointer path,
long size) |
static MemoryMappedFileResult |
Create(String path,
long size)
Create new file with indicated size, return in read/write mode
|
int |
file_descriptor() |
LongResult |
GetSize()
\brief Return the total file size in bytes.
|
static MemoryMappedFileResult |
Open(BytePointer path,
int mode) |
static MemoryMappedFileResult |
Open(BytePointer path,
int mode,
long offset,
long length) |
static MemoryMappedFileResult |
Open(String path,
FileMode.type mode) |
static MemoryMappedFileResult |
Open(String path,
FileMode.type mode,
long offset,
long length) |
BufferResult |
Read(long nbytes) |
LongResult |
Read(long nbytes,
Pointer out) |
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 |
Resize(long new_size)
\endcond
|
Status |
Seek(long _position) |
boolean |
supports_zero_copy() |
LongResult |
Tell() |
Status |
WillNeed(ReadRange ranges)
EXPERIMENTAL: Inform that the given ranges may be read soon.
|
Status |
Write(Pointer data,
long nbytes)
Write data at the current position in the file.
|
Status |
WriteAt(long _position,
Pointer data,
long nbytes)
Write data at a particular position in the file.
|
asWritableFile, asWritableFileasInputStream, asInputStream, asSeekable, asSeekable, GetStreamaddress, 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, zeropublic MemoryMappedFile(Pointer p)
Pointer(Pointer).@ByVal public static MemoryMappedFileResult Create(@StdString String path, @Cast(value="int64_t") long size)
@ByVal public static MemoryMappedFileResult Create(@StdString BytePointer path, @Cast(value="int64_t") long size)
@ByVal public static MemoryMappedFileResult Open(@StdString String path, FileMode.type mode)
@ByVal public static MemoryMappedFileResult Open(@StdString BytePointer path, @Cast(value="arrow::io::FileMode::type") int mode)
@ByVal public static MemoryMappedFileResult Open(@StdString String path, FileMode.type mode, @Cast(value="const int64_t") long offset, @Cast(value="const int64_t") long length)
@ByVal public static MemoryMappedFileResult Open(@StdString BytePointer path, @Cast(value="arrow::io::FileMode::type") int mode, @Cast(value="const int64_t") long offset, @Cast(value="const int64_t") long length)
@ByVal public LongResult Tell()
@ByVal public LongResult Read(@Cast(value="int64_t") long nbytes, Pointer out)
@ByVal public BufferResult Read(@Cast(value="int64_t") long nbytes)
@ByVal public BufferResult ReadAt(@Cast(value="int64_t") long _position, @Cast(value="int64_t") long nbytes)
RandomAccessFilenbytes bytes are read, but it can be less if EOF is reached.ReadAt in class RandomAccessFilenbytes - [in] The number of bytes to read@ByVal public LongResult ReadAt(@Cast(value="int64_t") long _position, @Cast(value="int64_t") long nbytes, Pointer out)
RandomAccessFilenbytes 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.ReadAt in class RandomAccessFilenbytes - [in] The number of bytes to readout - [out] The buffer to read bytes into@ByVal public Status WillNeed(@StdVector ReadRange ranges)
RandomAccessFileWillNeed in class RandomAccessFile@ByVal public Status Write(@Const Pointer data, @Cast(value="int64_t") long nbytes)
@ByVal public Status Resize(@Cast(value="int64_t") long new_size)
Set the size of the map to new_size.
@ByVal public Status WriteAt(@Cast(value="int64_t") long _position, @Const Pointer data, @Cast(value="int64_t") long nbytes)
@ByVal public LongResult GetSize()
RandomAccessFileGetSize in class RandomAccessFilepublic int file_descriptor()
Copyright © 2021. All rights reserved.