Uses of Class
jdk.incubator.foreign.ValueLayout.OfByte
Packages that use ValueLayout.OfByte
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of ValueLayout.OfByte in jdk.incubator.foreign
Fields in jdk.incubator.foreign declared as ValueLayout.OfByteModifier and TypeFieldDescriptionstatic final ValueLayout.OfByte
ValueLayout.JAVA_BYTE
A value layout constant whose size is the same as that of a Javabyte
, bit alignment set to 8, and byte order set toByteOrder.nativeOrder()
.Methods in jdk.incubator.foreign that return ValueLayout.OfByteMethods in jdk.incubator.foreign with parameters of type ValueLayout.OfByteModifier and TypeMethodDescriptiondefault MemorySegment
SegmentAllocator.allocate
(ValueLayout.OfByte layout, byte value) Allocate a memory segment with given layout and initialize it with given byte value.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout.OfByte elementLayout, byte[] array) Allocate a memory segment with given layout and initialize it with given byte array.byte
MemoryAddress.get
(ValueLayout.OfByte layout, long offset) Reads a byte from this address and offset with given layout.default byte
MemorySegment.get
(ValueLayout.OfByte layout, long offset) Reads a byte from this segment and offset with given layout.void
MemoryAddress.set
(ValueLayout.OfByte layout, long offset, byte value) Writes a byte to this address instance and offset with given layout.default void
MemorySegment.set
(ValueLayout.OfByte layout, long offset, byte value) Writes a byte to this segment and offset with given layout.byte[]
MemorySegment.toArray
(ValueLayout.OfByte elementLayout) Copy the contents of this memory segment into a fresh byte array.