Example usage for Java io.netty.util.internal PlatformDependent fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | BIG_ENDIAN_NATIVE_ORDER |
void | copyMemory(long srcAddr, long dstAddr, long length) |
void | copyMemory(byte[] src, int srcIndex, long dstAddr, long length) |
void | copyMemory(long srcAddr, byte[] dst, int dstIndex, long length) |
long | directBufferAddress(ByteBuffer buffer) |
boolean | directBufferPreferred() Returns true if the platform has reliable low-level direct buffer access API and a user has not specified -Dio.netty.noPreferDirect option. |
boolean | equals(byte[] bytes1, int startPos1, byte[] bytes2, int startPos2, int length) Compare two byte arrays for equality. |
int | equalsConstantTime(byte[] bytes1, int startPos1, byte[] bytes2, int startPos2, int length) Compare two byte arrays for equality without leaking timing information. |
void | freeDirectBuffer(ByteBuffer buffer) Try to deallocate the specified direct ByteBuffer . |
byte | getByte(byte[] data, int index) |
byte | getByte(long address) |
ClassLoader | getClassLoader(final Class> clazz) Return the ClassLoader for the given Class . |
int | getInt(Object object, long fieldOffset) |
int | getInt(byte[] data, int index) |
int | getInt(long address) |
long | getLong(byte[] data, int index) |
long | getLong(long address) |
short | getShort(byte[] data, int index) |
short | getShort(long address) |
boolean | hasUnsafe() Return true if sun.misc.Unsafe was found on the classpath and can be used for accelerated direct memory access. |
boolean | isAndroid() Returns true if and only if the current platform is Android |
boolean | isUnaligned() true if and only if the platform supports unaligned access. |
boolean | isWindows() Return true if the JVM is running on Windows |
boolean | isZero(byte[] bytes, int startPos, int length) Determine if a subsection of an array is zero. |
int | javaVersion() Return the version of Java under which this library is used. |
long | maxDirectMemory() Returns the maximum memory reserved for direct buffer allocation. |
ConcurrentMap | newConcurrentHashMap() Creates a new fastest ConcurrentMap implementation for the current platform. |
Queue | newFixedMpscQueue(int capacity) Create a new Queue which is safe to use for multiple producers (different threads) and a single consumer (one thread!) with the given fixes capacity . |
Queue | newMpscQueue() Create a new Queue which is safe to use for multiple producers (different threads) and a single consumer (one thread!). |
void | putByte(long address, byte value) |
void | putByte(byte[] data, int index, byte value) |
void | putInt(byte[] data, int index, int value) |
void | putInt(long address, int value) |
void | putLong(byte[] data, int index, long value) |
void | putLong(long address, long value) |
void | putShort(long address, short value) |
void | setMemory(long address, long bytes, byte value) |
Random | threadLocalRandom() Return a Random which is not-threadsafe and so can only be used from the same thread. |
void | throwException(Throwable t) Raises an exception bypassing compiler checks for checked exceptions. |