@Deprecated public final class ByteBuffers extends Object
ByteBuffer instances.
Provides functionality to directly set the address and capacity of a ByteBuffer.
Note: This class is deprecated and will be removed in version x.26.
| Modifier and Type | Method and Description |
|---|---|
static void |
setAddressCapacity(ByteBuffer buffer,
long address,
long capacity)
Deprecated.
Sets the memory address and capacity of a
ByteBuffer instance directly. |
public static void setAddressCapacity(ByteBuffer buffer, long address, long capacity)
ByteBuffer instance directly.
This method uses reflection to access and modify the address and capacity fields of the ByteBuffer. It should be used with caution as it bypasses the usual safety checks and can lead to undefined behavior if used improperly.
buffer - the ByteBuffer whose address and capacity are to be setaddress - the memory address to be setcapacity - the capacity to be setAssertionError - if the operation fails due to IllegalAccessException or IllegalArgumentExceptionCopyright © 2023. All rights reserved.