diff --git a/src/java.base/share/classes/java/lang/foreign/MemoryAddress.java b/src/java.base/share/classes/java/lang/foreign/MemoryAddress.java index e60ebb3628e..62122117a06 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemoryAddress.java +++ b/src/java.base/share/classes/java/lang/foreign/MemoryAddress.java @@ -167,7 +167,7 @@ static MemoryAddress ofLong(long value) { } /** - * Reads a byte at the given offset from this address, with the given layout. + * Reads a byte from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -188,7 +188,7 @@ static MemoryAddress ofLong(long value) { byte get(ValueLayout.OfByte layout, long offset); /** - * Writes a byte at the given offset from this address, with the given layout. + * Writes a byte into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -209,7 +209,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfByte layout, long offset, byte value); /** - * Reads a boolean at the given offset from this address, with the given layout. + * Reads a boolean from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -230,7 +230,7 @@ static MemoryAddress ofLong(long value) { boolean get(ValueLayout.OfBoolean layout, long offset); /** - * Writes a boolean at the given offset from this address, with the given layout. + * Writes a boolean into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -251,7 +251,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfBoolean layout, long offset, boolean value); /** - * Reads a char at the given offset from this address, with the given layout. + * Reads a char from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -272,7 +272,7 @@ static MemoryAddress ofLong(long value) { char get(ValueLayout.OfChar layout, long offset); /** - * Writes a char at the given offset from this address, with the given layout. + * Writes a char into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -293,7 +293,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfChar layout, long offset, char value); /** - * Reads a short at the given offset from this address, with the given layout. + * Reads a short from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -314,7 +314,7 @@ static MemoryAddress ofLong(long value) { short get(ValueLayout.OfShort layout, long offset); /** - * Writes a short at the given offset from this address, with the given layout. + * Writes a short into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -335,7 +335,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfShort layout, long offset, short value); /** - * Reads an int at the given offset from this address, with the given layout. + * Reads an int from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -356,7 +356,7 @@ static MemoryAddress ofLong(long value) { int get(ValueLayout.OfInt layout, long offset); /** - * Writes an int at the given offset from this address, with the given layout. + * Writes an int into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -377,7 +377,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfInt layout, long offset, int value); /** - * Reads a float at the given offset from this address, with the given layout. + * Reads a float from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -398,7 +398,7 @@ static MemoryAddress ofLong(long value) { float get(ValueLayout.OfFloat layout, long offset); /** - * Writes a float at the given offset from this address, with the given layout. + * Writes a float into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -419,7 +419,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfFloat layout, long offset, float value); /** - * Reads a long at the given offset from this address, with the given layout. + * Reads a long from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -440,7 +440,7 @@ static MemoryAddress ofLong(long value) { long get(ValueLayout.OfLong layout, long offset); /** - * Writes a long at the given offset from this address, with the given layout. + * Writes a long into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -461,7 +461,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfLong layout, long offset, long value); /** - * Reads a double at the given offset from this address, with the given layout. + * Reads a double from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -482,7 +482,7 @@ static MemoryAddress ofLong(long value) { double get(ValueLayout.OfDouble layout, long offset); /** - * Writes a double at the given offset from this address, with the given layout. + * Writes a double into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -503,7 +503,7 @@ static MemoryAddress ofLong(long value) { void set(ValueLayout.OfDouble layout, long offset, double value); /** - * Reads an address at the given offset from this address, with the given layout. + * Reads an address from this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -524,7 +524,7 @@ static MemoryAddress ofLong(long value) { MemoryAddress get(ValueLayout.OfAddress layout, long offset); /** - * Writes an address at the given offset from this address, with the given layout. + * Writes an address into this address at the given offset, with the given layout. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -567,7 +567,7 @@ static MemoryAddress ofLong(long value) { char getAtIndex(ValueLayout.OfChar layout, long index); /** - * Writes a char to this address at the given index, scaled by the given layout size. + * Writes a char into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -611,7 +611,7 @@ static MemoryAddress ofLong(long value) { short getAtIndex(ValueLayout.OfShort layout, long index); /** - * Writes a short to this address at the given index, scaled by the given layout size. + * Writes a short into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -655,7 +655,7 @@ static MemoryAddress ofLong(long value) { int getAtIndex(ValueLayout.OfInt layout, long index); /** - * Writes an int to this address at the given index, scaled by the given layout size. + * Writes an int into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -699,7 +699,7 @@ static MemoryAddress ofLong(long value) { float getAtIndex(ValueLayout.OfFloat layout, long index); /** - * Writes a float to this address at the given index, scaled by the given layout size. + * Writes a float into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -743,7 +743,7 @@ static MemoryAddress ofLong(long value) { long getAtIndex(ValueLayout.OfLong layout, long index); /** - * Writes a long to this address at the given index, scaled by the given layout size. + * Writes a long into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -787,7 +787,7 @@ static MemoryAddress ofLong(long value) { double getAtIndex(ValueLayout.OfDouble layout, long index); /** - * Writes a double to this address at the given index, scaled by the given layout size. + * Writes a double into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash @@ -831,7 +831,7 @@ static MemoryAddress ofLong(long value) { MemoryAddress getAtIndex(ValueLayout.OfAddress layout, long index); /** - * Writes an address to this address at the given index, scaled by the given layout size. + * Writes an address into this address at the given index, scaled by the given layout size. *

* This method is restricted. * Restricted methods are unsafe, and, if used incorrectly, their use might crash diff --git a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java index 3b29756fb23..a4cd0f1c44f 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java +++ b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java @@ -1077,7 +1077,7 @@ static void copy(MemorySegment srcSegment, ValueLayout srcElementLayout, long sr } /** - * Reads a byte at the given offset from this segment, with the given layout. + * Reads a byte from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1098,7 +1098,7 @@ default byte get(ValueLayout.OfByte layout, long offset) { } /** - * Writes a byte at the given offset from this segment, with the given layout. + * Writes a byte into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1120,7 +1120,7 @@ default void set(ValueLayout.OfByte layout, long offset, byte value) { } /** - * Reads a boolean at the given offset from this segment, with the given layout. + * Reads a boolean from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1141,7 +1141,7 @@ default boolean get(ValueLayout.OfBoolean layout, long offset) { } /** - * Writes a boolean at the given offset from this segment, with the given layout. + * Writes a boolean into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1163,7 +1163,7 @@ default void set(ValueLayout.OfBoolean layout, long offset, boolean value) { } /** - * Reads a char at the given offset from this segment, with the given layout. + * Reads a char from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1184,7 +1184,7 @@ default char get(ValueLayout.OfChar layout, long offset) { } /** - * Writes a char at the given offset from this segment, with the given layout. + * Writes a char into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1206,7 +1206,7 @@ default void set(ValueLayout.OfChar layout, long offset, char value) { } /** - * Reads a short at the given offset from this segment, with the given layout. + * Reads a short from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1227,7 +1227,7 @@ default short get(ValueLayout.OfShort layout, long offset) { } /** - * Writes a short at the given offset from this segment, with the given layout. + * Writes a short into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1249,7 +1249,7 @@ default void set(ValueLayout.OfShort layout, long offset, short value) { } /** - * Reads an int at the given offset from this segment, with the given layout. + * Reads an int from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1270,7 +1270,7 @@ default int get(ValueLayout.OfInt layout, long offset) { } /** - * Writes an int at the given offset from this segment, with the given layout. + * Writes an int into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1292,7 +1292,7 @@ default void set(ValueLayout.OfInt layout, long offset, int value) { } /** - * Reads a float at the given offset from this segment, with the given layout. + * Reads a float from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1313,7 +1313,7 @@ default float get(ValueLayout.OfFloat layout, long offset) { } /** - * Writes a float at the given offset from this segment, with the given layout. + * Writes a float into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1335,7 +1335,7 @@ default void set(ValueLayout.OfFloat layout, long offset, float value) { } /** - * Reads a long at the given offset from this segment, with the given layout. + * Reads a long from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1356,7 +1356,7 @@ default long get(ValueLayout.OfLong layout, long offset) { } /** - * Writes a long at the given offset from this segment, with the given layout. + * Writes a long into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1378,7 +1378,7 @@ default void set(ValueLayout.OfLong layout, long offset, long value) { } /** - * Reads a double at the given offset from this segment, with the given layout. + * Reads a double from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1399,7 +1399,7 @@ default double get(ValueLayout.OfDouble layout, long offset) { } /** - * Writes a double at the given offset from this segment, with the given layout. + * Writes a double into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1421,7 +1421,7 @@ default void set(ValueLayout.OfDouble layout, long offset, double value) { } /** - * Reads an address at the given offset from this segment, with the given layout. + * Reads an address from this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be read. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1442,7 +1442,7 @@ default MemoryAddress get(ValueLayout.OfAddress layout, long offset) { } /** - * Writes an address at the given offset from this segment, with the given layout. + * Writes an address into this segment at the given offset, with the given layout. * * @param layout the layout of the memory region to be written. * @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1488,7 +1488,7 @@ default char getAtIndex(ValueLayout.OfChar layout, long index) { } /** - * Writes a char to this segment at the given index, scaled by the given layout size. + * Writes a char into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1537,7 +1537,7 @@ default short getAtIndex(ValueLayout.OfShort layout, long index) { } /** - * Writes a short to this segment at the given index, scaled by the given layout size. + * Writes a short into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1586,7 +1586,7 @@ default int getAtIndex(ValueLayout.OfInt layout, long index) { } /** - * Writes an int to this segment at the given index, scaled by the given layout size. + * Writes an int into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1635,7 +1635,7 @@ default float getAtIndex(ValueLayout.OfFloat layout, long index) { } /** - * Writes a float to this segment at the given index, scaled by the given layout size. + * Writes a float into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1684,7 +1684,7 @@ default long getAtIndex(ValueLayout.OfLong layout, long index) { } /** - * Writes a long to this segment at the given index, scaled by the given layout size. + * Writes a long into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1733,7 +1733,7 @@ default double getAtIndex(ValueLayout.OfDouble layout, long index) { } /** - * Writes a double to this segment at the given index, scaled by the given layout size. + * Writes a double into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment, @@ -1782,7 +1782,7 @@ default MemoryAddress getAtIndex(ValueLayout.OfAddress layout, long index) { } /** - * Writes an address to this segment at the given index, scaled by the given layout size. + * Writes an address into this segment at the given index, scaled by the given layout size. * * @param layout the layout of the memory region to be written. * @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,