Uses of Interface
java.lang.foreign.ValueLayout.OfLong
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
-
Uses of ValueLayout.OfLongPREVIEW in java.lang.foreign
Modifier and TypeFieldDescriptionstatic final ValueLayout.OfLongPREVIEW
ValueLayout.JAVA_LONG
A value layout constant whose size is the same as that of a Javalong
, (platform-dependent) byte alignment set toADDRESS.byteSize()
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout.OfLongPREVIEW
ValueLayout.JAVA_LONG_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Javalong
and byte order set toByteOrder.nativeOrder()
.Modifier and TypeMethodDescriptionValueLayout.OfLong.withByteAlignment
(long byteAlignment) Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).Returns a memory layout with the same characteristics as this layout, but with the given name.Returns a value layout with the same characteristics as this layout, but with the given byte order.ValueLayout.OfLong.withoutName()
Returns a memory layout with the same characteristics as this layout, but with no name.Modifier and TypeMethodDescriptiondefault MemorySegmentPREVIEW
SegmentAllocator.allocate
(ValueLayout.OfLongPREVIEW layout, long value) Allocates a memory segment with the given layout and initializes it with the given long value.default MemorySegmentPREVIEW
SegmentAllocator.allocateArray
(ValueLayout.OfLongPREVIEW elementLayout, long... elements) Allocates a memory segment with the given layout and initializes it with the given long elements.default long
MemorySegment.get
(ValueLayout.OfLongPREVIEW layout, long offset) Reads a long from this segment at the given offset, with the given layout.default long
MemorySegment.getAtIndex
(ValueLayout.OfLongPREVIEW layout, long index) Reads a long from this segment at the given index, scaled by the given layout size.default void
MemorySegment.set
(ValueLayout.OfLongPREVIEW layout, long offset, long value) Writes a long into this segment at the given offset, with the given layout.default void
MemorySegment.setAtIndex
(ValueLayout.OfLongPREVIEW layout, long index, long value) Writes a long into this segment at the given index, scaled by the given layout size.long[]
MemorySegment.toArray
(ValueLayout.OfLongPREVIEW elementLayout) Copy the contents of this memory segment into a new long array.