# Uses of Class
jdk.incubator.foreign.ValueLayout.OfLong

Packages that use ValueLayout.OfLong
Package
Description
jdk.incubator.foreign
Classes to support low-level and efficient foreign memory/function access, directly from Java.

## Uses of ValueLayout.OfLong in jdk.incubator.foreign

Fields in jdk.incubator.foreign declared as ValueLayout.OfLong
Modifier and Type
Field
Description
`static final ValueLayout.OfLong`
ValueLayout.`JAVA_LONG`
A value layout constant whose size is the same as that of a Java `long`, bit alignment set to 8, and byte order set to `ByteOrder.nativeOrder()`.
Methods in jdk.incubator.foreign that return ValueLayout.OfLong
Modifier and Type
Method
Description
`ValueLayout.OfLong`
ValueLayout.OfLong.`withBitAlignment(long alignmentBits)`
`ValueLayout.OfLong`
ValueLayout.OfLong.`withName(String name)`
`ValueLayout.OfLong`
ValueLayout.OfLong.`withOrder(ByteOrder order)`
Methods in jdk.incubator.foreign with parameters of type ValueLayout.OfLong
Modifier and Type
Method
Description
`VaList.Builder`
VaList.Builder.`addVarg(ValueLayout.OfLong layout, long value)`
Writes a `long` value to the variable argument list being constructed.
`default MemorySegment`
SegmentAllocator.`allocate(ValueLayout.OfLong layout, long value)`
Allocate a memory segment with given layout and initialize it with given long value.
`default MemorySegment`
SegmentAllocator.`allocateArray(ValueLayout.OfLong elementLayout, long[] array)`
Allocate a memory segment with given layout and initialize it with given long array.
`long`
MemoryAddress.`get(ValueLayout.OfLong layout, long offset)`
Reads a long from this address and offset with given layout.
`default long`
MemorySegment.`get(ValueLayout.OfLong layout, long offset)`
Reads a long from this segment and offset with given layout.
`long`
MemoryAddress.`getAtIndex(ValueLayout.OfLong layout, long index)`
Reads a long from this address and index, scaled by given layout size.
`default long`
MemorySegment.`getAtIndex(ValueLayout.OfLong layout, long index)`
Reads a long from this segment and index, scaled by given layout size.
`long`
VaList.`nextVarg(ValueLayout.OfLong layout)`
Reads the next value as a `long` and advances this variable argument list's position.
`void`
MemoryAddress.`set(ValueLayout.OfLong layout, long offset, long value)`
Writes a long to this address instance and offset with given layout.
`default void`
MemorySegment.`set(ValueLayout.OfLong layout, long offset, long value)`
Writes a long to this segment and offset with given layout.
`void`
MemoryAddress.`setAtIndex(ValueLayout.OfLong layout, long index, long value)`
Writes a long to this address instance and index, scaled by given layout size.
`default void`
MemorySegment.`setAtIndex(ValueLayout.OfLong layout, long index, long value)`
Writes a long to this segment and index, scaled by given layout size.
`long[]`
MemorySegment.`toArray(ValueLayout.OfLong elementLayout)`
Copy the contents of this memory segment into a fresh long array.