public final class NativeAccess<T> extends Object implements Access<T>
| Modifier and Type | Method and Description |
|---|---|
ByteOrder |
byteOrder(T handle) |
boolean |
compareAndSwapInt(T handle,
long offset,
int expected,
int value)
Default implementation: throws
UnsupportedOperationException. |
boolean |
compareAndSwapLong(T handle,
long offset,
long expected,
long value)
Default implementation: throws
UnsupportedOperationException. |
static <T> NativeAccess<T> |
instance() |
byte |
readByte(T handle,
long offset) |
char |
readChar(T handle,
long offset) |
double |
readDouble(T handle,
long offset)
Default implementation:
Double.longBitsToDouble(readLong(handle, offset)). |
float |
readFloat(T handle,
long offset)
Default implementation:
Float.intBitsToFloat(readInt(handle, offset)). |
int |
readInt(T handle,
long offset) |
long |
readLong(T handle,
long offset) |
short |
readShort(T handle,
long offset) |
int |
readVolatileInt(T handle,
long offset)
Default implementation: throws
UnsupportedOperationException. |
long |
readVolatileLong(T handle,
long offset)
Default implementation: throws
UnsupportedOperationException. |
default void |
writeBoolean(T handle,
long offset,
boolean flag) |
void |
writeByte(T handle,
long offset,
byte i8) |
default void |
writeByte(T handle,
long offset,
int i) |
void |
writeBytes(T handle,
long offset,
long len,
byte b) |
void |
writeChar(T handle,
long offset,
char c) |
void |
writeDouble(T handle,
long offset,
double d) |
void |
writeFloat(T handle,
long offset,
float d) |
<S> void |
writeFrom(T handle,
long offset,
ReadAccess<S> sourceAccess,
S source,
long sourceOffset,
long len) |
void |
writeInt(T handle,
long offset,
int i) |
void |
writeLong(T handle,
long offset,
long i) |
void |
writeOrderedInt(T handle,
long offset,
int i)
Default implementation: throws
UnsupportedOperationException. |
void |
writeOrderedLong(T handle,
long offset,
long i)
Default implementation: throws
UnsupportedOperationException. |
void |
writeShort(T handle,
long offset,
short i) |
default void |
writeUnsignedByte(T handle,
long offset,
int i) |
default void |
writeUnsignedInt(T handle,
long offset,
long i) |
default void |
writeUnsignedShort(T handle,
long offset,
int i) |
void |
zeroOut(T handle,
long offset,
long len) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckedByteBufferAccess, checkedBytesStoreAccess, checkedRandomDataInputAccess, copy, equivalent, nativeAccesscompareTo, printable, readBoolean, readUnsignedByte, readUnsignedInt, readUnsignedShort, zerospublic static <T> NativeAccess<T> instance()
public byte readByte(T handle, long offset)
readByte in interface ReadAccess<T>public short readShort(T handle, long offset)
readShort in interface ReadAccess<T>public char readChar(T handle, long offset)
readChar in interface ReadAccess<T>public int readInt(T handle, long offset)
readInt in interface ReadAccess<T>public long readLong(T handle, long offset)
readLong in interface ReadAccess<T>public float readFloat(T handle, long offset)
ReadAccessFloat.intBitsToFloat(readInt(handle, offset)).readFloat in interface ReadAccess<T>public double readDouble(T handle, long offset)
ReadAccessDouble.longBitsToDouble(readLong(handle, offset)).readDouble in interface ReadAccess<T>public int readVolatileInt(T handle, long offset)
ReadAccessUnsupportedOperationException.readVolatileInt in interface ReadAccess<T>public long readVolatileLong(T handle, long offset)
ReadAccessUnsupportedOperationException.readVolatileLong in interface ReadAccess<T>public void writeByte(T handle, long offset, byte i8)
public void writeShort(T handle, long offset, short i)
public void writeChar(T handle, long offset, char c)
public void writeInt(T handle, long offset, int i)
public void writeOrderedInt(T handle, long offset, int i)
UnsupportedOperationException.public void writeLong(T handle, long offset, long i)
public void writeOrderedLong(T handle, long offset, long i)
UnsupportedOperationException.public void writeFloat(T handle, long offset, float d)
public void writeDouble(T handle, long offset, double d)
public boolean compareAndSwapInt(T handle, long offset, int expected, int value)
AccessUnsupportedOperationException.compareAndSwapInt in interface Access<T>public boolean compareAndSwapLong(T handle, long offset, long expected, long value)
AccessUnsupportedOperationException.compareAndSwapLong in interface Access<T>public <S> void writeFrom(T handle, long offset, ReadAccess<S> sourceAccess, S source, long sourceOffset, long len)
public void writeBytes(T handle, long offset, long len, byte b)
public void zeroOut(T handle, long offset, long len)
public void writeByte(T handle,
long offset,
int i)
public void writeUnsignedByte(T handle,
long offset,
int i)
public void writeBoolean(T handle,
long offset,
boolean flag)
public void writeUnsignedShort(T handle,
long offset,
int i)
public void writeUnsignedInt(T handle,
long offset,
long i)
Copyright © 2020. All rights reserved.