Uses of Class
java.lang.foreign.ValueLayout.OfShort
Packages that use ValueLayout.OfShortPREVIEW
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
-
Uses of ValueLayout.OfShortPREVIEW in java.lang.foreign
Fields in java.lang.foreign declared as ValueLayout.OfShortPREVIEWModifier and TypeFieldDescriptionstatic final ValueLayout.OfShortPREVIEW
ValueLayout.JAVA_SHORT
A value layout constant whose size is the same as that of a Javashort
, bit alignment set to 16, and byte order set toByteOrder.nativeOrder()
.Methods in java.lang.foreign that return ValueLayout.OfShortPREVIEWMethods in java.lang.foreign with parameters of type ValueLayout.OfShortPREVIEWModifier and TypeMethodDescriptiondefault MemorySegmentPREVIEW
SegmentAllocator.allocate
(ValueLayout.OfShortPREVIEW layout, short value) Allocates a memory segment with the given layout and initializes it with the given short value.default MemorySegmentPREVIEW
SegmentAllocator.allocateArray
(ValueLayout.OfShortPREVIEW elementLayout, short... elements) Allocates a memory segment with the given layout and initializes it with the given short elements.short
MemoryAddress.get
(ValueLayout.OfShortPREVIEW layout, long offset) Reads a short from this address at the given offset, with the given layout.default short
MemorySegment.get
(ValueLayout.OfShortPREVIEW layout, long offset) Reads a short from this segment at the given offset, with the given layout.short
MemoryAddress.getAtIndex
(ValueLayout.OfShortPREVIEW layout, long index) Reads a short from this address at the given index, scaled by the given layout size.default short
MemorySegment.getAtIndex
(ValueLayout.OfShortPREVIEW layout, long index) Reads a short from this segment at the given index, scaled by the given layout size.void
MemoryAddress.set
(ValueLayout.OfShortPREVIEW layout, long offset, short value) Writes a short into this address at the given offset, with the given layout.default void
MemorySegment.set
(ValueLayout.OfShortPREVIEW layout, long offset, short value) Writes a short into this segment at the given offset, with the given layout.void
MemoryAddress.setAtIndex
(ValueLayout.OfShortPREVIEW layout, long index, short value) Writes a short into this address at the given index, scaled by the given layout size.default void
MemorySegment.setAtIndex
(ValueLayout.OfShortPREVIEW layout, long index, short value) Writes a short into this segment at the given index, scaled by the given layout size.short[]
MemorySegment.toArray
(ValueLayout.OfShortPREVIEW elementLayout) Copy the contents of this memory segment into a new short array.