Uses of Interface
java.lang.foreign.ValueLayout.OfByte
Packages that use ValueLayout.OfBytePREVIEW
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
-
Uses of ValueLayout.OfBytePREVIEW in java.lang.foreign
Fields in java.lang.foreign declared as ValueLayout.OfBytePREVIEWModifier and TypeFieldDescriptionstatic final ValueLayout.OfBytePREVIEW
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 java.lang.foreign that return ValueLayout.OfBytePREVIEWModifier and TypeMethodDescriptionValueLayout.OfByte.withBitAlignment
(long bitAlignment) Returns a memory layout of the same type with the same size and name as this layout, but with the specified alignment constraint (in bits).Returns a memory layout of the same type with the same size and alignment constraint as this layout, but with the specified name.Returns a value layout with the same carrier, alignment constraint and name as this value layout, but with the specified byte order.Methods in java.lang.foreign with parameters of type ValueLayout.OfBytePREVIEWModifier and TypeMethodDescriptiondefault MemorySegmentPREVIEW
SegmentAllocator.allocate
(ValueLayout.OfBytePREVIEW layout, byte value) Allocates a memory segment with the given layout and initializes it with the given byte value.default MemorySegmentPREVIEW
SegmentAllocator.allocateArray
(ValueLayout.OfBytePREVIEW elementLayout, byte... elements) Allocates a memory segment with the given layout and initializes it with the given byte elements.default byte
MemorySegment.get
(ValueLayout.OfBytePREVIEW layout, long offset) Reads a byte from this segment at the given offset, with the given layout.default void
MemorySegment.set
(ValueLayout.OfBytePREVIEW layout, long offset, byte value) Writes a byte into this segment at the given offset, with the given layout.byte[]
MemorySegment.toArray
(ValueLayout.OfBytePREVIEW elementLayout) Copy the contents of this memory segment into a new byte array.