public interface RawFileOperationSupport
| Modifier and Type | Interface and Description |
|---|---|
static class |
RawFileOperationSupport.FileAccessMode
The file access modes that can be used when opening/creating a file.
|
static interface |
RawFileOperationSupport.RawFileDescriptor
OS-specific signed value that represents a file descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
static RawFileOperationSupport |
bigEndian()
Returns a
RawFileOperationSupport singleton that uses big endian byte ordering. |
boolean |
close(RawFileOperationSupport.RawFileDescriptor fd)
Closes a file descriptor.
|
boolean |
isValid(RawFileOperationSupport.RawFileDescriptor fd)
Checks if a file descriptor is valid or if it represents an error value.
|
static RawFileOperationSupport |
littleEndian()
Returns a
RawFileOperationSupport singleton that uses little endian byte ordering. |
static RawFileOperationSupport |
nativeByteOrder()
Returns a
RawFileOperationSupport singleton that uses the native byte ordering of the
underlying architecture. |
RawFileOperationSupport.RawFileDescriptor |
open(File file,
RawFileOperationSupport.FileAccessMode mode)
Opens or creates a file with the specified
access mode. |
RawFileOperationSupport.RawFileDescriptor |
open(String filename,
RawFileOperationSupport.FileAccessMode mode)
Opens or creates a file with the specified
access mode. |
org.graalvm.word.SignedWord |
position(RawFileOperationSupport.RawFileDescriptor fd)
Gets the current file position within a file.
|
org.graalvm.word.SignedWord |
read(RawFileOperationSupport.RawFileDescriptor fd,
org.graalvm.word.Pointer buffer,
org.graalvm.word.UnsignedWord bufferSize)
Reads up to bufferSize bytes of data from to the current file position and advances the file
position.
|
boolean |
seek(RawFileOperationSupport.RawFileDescriptor fd,
org.graalvm.word.SignedWord position)
Sets the current file position within a file.
|
org.graalvm.word.SignedWord |
size(RawFileOperationSupport.RawFileDescriptor fd)
Returns the size of a file.
|
boolean |
write(RawFileOperationSupport.RawFileDescriptor fd,
byte[] data)
Writes data to the current file position and advances the file position.
|
boolean |
write(RawFileOperationSupport.RawFileDescriptor fd,
org.graalvm.word.Pointer data,
org.graalvm.word.UnsignedWord size)
Writes data to the current file position and advances the file position.
|
boolean |
writeBoolean(RawFileOperationSupport.RawFileDescriptor fd,
boolean data)
Writes data to the current file position and advances the file position.
|
boolean |
writeByte(RawFileOperationSupport.RawFileDescriptor fd,
byte data)
Writes data to the current file position and advances the file position.
|
boolean |
writeChar(RawFileOperationSupport.RawFileDescriptor fd,
char data)
Writes a char value in the specified byte ordering to the current file position and advances
the file position.
|
boolean |
writeInt(RawFileOperationSupport.RawFileDescriptor fd,
int data)
Writes an integer value in the specified byte ordering to the current file position and
advances the file position.
|
boolean |
writeLong(RawFileOperationSupport.RawFileDescriptor fd,
long data)
Writes a long value in the specified byte ordering to the current file position and advances
the file position.
|
boolean |
writeShort(RawFileOperationSupport.RawFileDescriptor fd,
short data)
Writes a short value in the specified byte ordering to the current file position and advances
the file position.
|
static RawFileOperationSupport littleEndian()
RawFileOperationSupport singleton that uses little endian byte ordering.static RawFileOperationSupport bigEndian()
RawFileOperationSupport singleton that uses big endian byte ordering.static RawFileOperationSupport nativeByteOrder()
RawFileOperationSupport singleton that uses the native byte ordering of the
underlying architecture.RawFileOperationSupport.RawFileDescriptor open(String filename, RawFileOperationSupport.FileAccessMode mode)
access mode.RawFileOperationSupport.isValid(com.oracle.svm.core.os.RawFileOperationSupport.RawFileDescriptor) will return false.RawFileOperationSupport.RawFileDescriptor open(File file, RawFileOperationSupport.FileAccessMode mode)
access mode.RawFileOperationSupport.isValid(com.oracle.svm.core.os.RawFileOperationSupport.RawFileDescriptor) will return false.boolean isValid(RawFileOperationSupport.RawFileDescriptor fd)
boolean close(RawFileOperationSupport.RawFileDescriptor fd)
org.graalvm.word.SignedWord size(RawFileOperationSupport.RawFileDescriptor fd)
org.graalvm.word.SignedWord position(RawFileOperationSupport.RawFileDescriptor fd)
boolean seek(RawFileOperationSupport.RawFileDescriptor fd, org.graalvm.word.SignedWord position)
boolean write(RawFileOperationSupport.RawFileDescriptor fd, org.graalvm.word.Pointer data, org.graalvm.word.UnsignedWord size)
boolean write(RawFileOperationSupport.RawFileDescriptor fd, byte[] data)
boolean writeBoolean(RawFileOperationSupport.RawFileDescriptor fd, boolean data)
boolean writeByte(RawFileOperationSupport.RawFileDescriptor fd, byte data)
boolean writeShort(RawFileOperationSupport.RawFileDescriptor fd, short data)
boolean writeChar(RawFileOperationSupport.RawFileDescriptor fd, char data)
boolean writeInt(RawFileOperationSupport.RawFileDescriptor fd, int data)
boolean writeLong(RawFileOperationSupport.RawFileDescriptor fd, long data)
org.graalvm.word.SignedWord read(RawFileOperationSupport.RawFileDescriptor fd, org.graalvm.word.Pointer buffer, org.graalvm.word.UnsignedWord bufferSize)