# Uses of Interface
java.lang.foreign.ValueLayout.OfInt

Packages that use ValueLayout.OfIntPREVIEW
Package
Description
java.lang.foreign
Provides low-level access to memory and functions outside the Java runtime.

- ## Uses of ValueLayout.OfIntPREVIEW in java.lang.foreign

  Fields in java.lang.foreign declared as ValueLayout.OfIntPREVIEW
  Modifier and Type
  Field
  Description
  `static final ValueLayout.OfIntPREVIEW`
  ValueLayout.`JAVA_INT`
  A value layout constant whose size is the same as that of a Java `int`, bit alignment set to 32, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout.OfIntPREVIEW`
  ValueLayout.`JAVA_INT_UNALIGNED`
  An unaligned value layout constant whose size is the same as that of a Java `int` and byte order set to `ByteOrder.nativeOrder()`.
  Methods in java.lang.foreign that return ValueLayout.OfIntPREVIEW
  Modifier and Type
  Method
  Description
  `ValueLayout.OfIntPREVIEW`
  ValueLayout.OfInt.`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).
  `ValueLayout.OfIntPREVIEW`
  ValueLayout.OfInt.`withName(String name)`
  Returns a memory layout of the same type with the same size and alignment constraint as this layout, but with the specified name.
  `ValueLayout.OfIntPREVIEW`
  ValueLayout.OfInt.`withOrder(ByteOrder order)`
  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.OfIntPREVIEW
  Modifier and Type
  Method
  Description
  `VaList.BuilderPREVIEW`
  VaList.Builder.`addVarg(ValueLayout.OfIntPREVIEW layout, int value)`
  Writes an `int` value to the variable argument list being constructed.
  `default MemorySegmentPREVIEW`
  SegmentAllocator.`allocate(ValueLayout.OfIntPREVIEW layout, int value)`
  Allocates a memory segment with the given layout and initializes it with the given int value.
  `default MemorySegmentPREVIEW`
  SegmentAllocator.`allocateArray(ValueLayout.OfIntPREVIEW elementLayout, int... elements)`
  Allocates a memory segment with the given layout and initializes it with the given int elements.
  `default int`
  MemorySegment.`get(ValueLayout.OfIntPREVIEW layout, long offset)`
  Reads an int from this segment at the given offset, with the given layout.
  `default int`
  MemorySegment.`getAtIndex(ValueLayout.OfIntPREVIEW layout, long index)`
  Reads an int from this segment at the given index, scaled by the given layout size.
  `int`
  VaList.`nextVarg(ValueLayout.OfIntPREVIEW layout)`
  Reads the next value as an `int` and advances this variable argument list's position.
  `default void`
  MemorySegment.`set(ValueLayout.OfIntPREVIEW layout, long offset, int value)`
  Writes an int into this segment at the given offset, with the given layout.
  `default void`
  MemorySegment.`setAtIndex(ValueLayout.OfIntPREVIEW layout, long index, int value)`
  Writes an int into this segment at the given index, scaled by the given layout size.
  `int[]`
  MemorySegment.`toArray(ValueLayout.OfIntPREVIEW elementLayout)`
  Copy the contents of this memory segment into a new int array.