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 2b931a7d2e0..78098e39a17 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java +++ b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java @@ -1354,6 +1354,7 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { * @throws WrongThreadException if this method is called from a thread {@code T}, * such that {@code isAccessibleBy(T) == false} * @throws IllegalArgumentException if {@code byteLength < 0} + * @since 27 */ String getString(long offset, Charset charset, long byteLength); @@ -2669,6 +2670,7 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { * @throws IndexOutOfBoundsException if {@code dstOffset > dstSegment.byteSize() - B} where {@code B} is the size, * in bytes, of the substring of {@code src} encoded using the given charset * @return the number of copied bytes. + * @since 27 */ @ForceInline static long copy(String src, Charset dstEncoding, int srcIndex, MemorySegment dst, long dstOffset, int numChars) { diff --git a/src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java b/src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java index 5b213af544f..03d92ec24ef 100644 --- a/src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java +++ b/src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java @@ -183,6 +183,7 @@ public interface SegmentAllocator { * {@code this.allocate(B)}, where {@code B} is the size, in bytes, of * the string encoded using the provided charset * (e.g. {@code str.getBytes(charset).length}); + * @since 27 */ @ForceInline default MemorySegment allocateFrom(String str, Charset charset, int srcIndex, int numChars) {