@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()
\brief Close the stream cleanly
For writable streams, this will attempt to flush any pending data
before releasing the underlying resource.
|
boolean |
closed()
\brief Return whether the stream is closed
|
static MemoryMappedFileResult |
Create(BytePointer path,
long size) |
static Status |
Create(BytePointer path,
long size,
MemoryMappedFile out)
Deprecated.
|
static MemoryMappedFileResult |
Create(String path,
long size)
Create new file with indicated size, return in read/write mode
|
static Status |
Create(String path,
long size,
MemoryMappedFile out)
Deprecated.
|
int |
file_descriptor() |
LongResult |
GetSize()
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 Status |
Open(BytePointer path,
int mode,
long offset,
long length,
MemoryMappedFile out)
Deprecated.
|
static Status |
Open(BytePointer path,
int mode,
MemoryMappedFile out)
Deprecated.
|
static MemoryMappedFileResult |
Open(String path,
FileMode.type mode) |
static MemoryMappedFileResult |
Open(String path,
FileMode.type mode,
long offset,
long length) |
static Status |
Open(String path,
FileMode.type mode,
long offset,
long length,
MemoryMappedFile out)
Deprecated.
|
static Status |
Open(String path,
FileMode.type mode,
MemoryMappedFile out)
Deprecated.
|
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()
\brief Return true if InputStream is capable of zero copy Buffer reads
Zero copy reads imply the use of Buffer-returning Read() overloads.
|
LongResult |
Tell()
\brief Return the position in this stream
|
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, asWritableFileasSeekable, asSeekable, GetSize, GetSize, GetSize, GetStream, ReadAt, ReadAt, ReadAt, ReadAtAdvance, asReadable, asReadable, Peekaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic MemoryMappedFile(Pointer p)
Pointer.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)
@Deprecated @ByVal public static Status Create(@StdString String path, @Cast(value="int64_t") long size, @SharedPtr MemoryMappedFile out)
@Deprecated @ByVal public static Status Create(@StdString BytePointer path, @Cast(value="int64_t") long size, @SharedPtr MemoryMappedFile out)
@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)
@Deprecated @ByVal public static Status Open(@StdString String path, FileMode.type mode, @SharedPtr MemoryMappedFile out)
@Deprecated @ByVal public static Status Open(@StdString BytePointer path, @Cast(value="arrow::io::FileMode::type") int mode, @SharedPtr MemoryMappedFile out)
@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)
@Deprecated @ByVal public static Status Open(@StdString String path, FileMode.type mode, @Cast(value="const int64_t") long offset, @Cast(value="const int64_t") long length, @SharedPtr MemoryMappedFile out)
@Deprecated @ByVal public static Status 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, @SharedPtr MemoryMappedFile out)
@ByVal public Status Close()
FileInterfaceClose in class FileInterface@Cast(value="bool") public boolean closed()
FileInterfaceclosed in class FileInterface@ByVal public LongResult Tell()
FileInterfaceTell in class FileInterface@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@Cast(value="bool") public boolean supports_zero_copy()
InputStreamsupports_zero_copy in class InputStream@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 © 2020. All rights reserved.