void (@NotNull ByteBuffer src, int index, byte[] dst, int dstIndex, int length) { if (address != null && src.isDirect()) { try { long address = (long)ByteBufferUtil.address.invoke(src); Unsafe.copyMemory(null, address + index, dst, byteArrayBaseOffset + dstIndex, length); return; } catch (Throwable e) { getLogger().warn(e); } } ByteBuffer buf = src.duplicate(); buf.position(index); buf.get(dst, dstIndex, length); }