<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Brett, I think your suggestion makes sense. I have created <a href="https://bugs.openjdk.org/browse/JDK-8361209">
https://bugs.openjdk.org/browse/JDK-8361209</a> to track this RFE.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Feel free to contribute a patch to implement this enhancement.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg">
<div style="direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<b>From:</b> core-libs-dev <core-libs-dev-retn@openjdk.org> on behalf of Brett Okken <brett.okken.os@gmail.com><br>
<b>Sent:</b> Tuesday, July 1, 2025 9:57 AM<br>
<b>To:</b> core-libs-dev <core-libs-dev@openjdk.org><br>
<b>Subject:</b> StringCharBuffer and bulk get</div>
<div style="direction: ltr;"> </div>
</div>
<div style="font-size: 11pt;">jdk 25 introduced[1] a bulk getChars method to CharSequence[2].<br>
Should StringCharBuffer be updated to utilize that new method to<br>
implement the bulk get method[3]?<br>
That would presumably require changes to the private getArray[4].<br>
I think there could also be changes to putBuffer[5] for when the<br>
target has an array. That array could be used for the getChars call.<br>
<br>
[1] - <a href="https://github.com/openjdk/jdk/commit/7642556a5a131e9104033ad7d7abfdb4be5012cf" id="OWA8c2e16b2-fc33-a8fb-010a-a97fc4fa987e" class="OWAAutoLink" data-auth="NotApplicable">
https://github.com/openjdk/jdk/commit/7642556a5a131e9104033ad7d7abfdb4be5012cf</a><br>
[2] - <a href="https://download.java.net/java/early_access/jdk25/docs/api/java.base/java/lang/CharSequence.html#getChars(int,int,char%5B%5D,int)" id="OWA638a56a7-1ef9-e527-4c4e-752a68b77e44" class="OWAAutoLink" data-auth="NotApplicable">
https://download.java.net/java/early_access/jdk25/docs/api/java.base/java/lang/CharSequence.html#getChars(int,int,char%5B%5D,int)</a><br>
[3] - <a href="https://download.java.net/java/early_access/jdk25/docs/api/java.base/java/nio/CharBuffer.html#get(int,char%5B%5D,int,int)" id="OWA158583ef-3cab-1cc8-3173-bd7e09ae4fda" class="OWAAutoLink" data-auth="NotApplicable">
https://download.java.net/java/early_access/jdk25/docs/api/java.base/java/nio/CharBuffer.html#get(int,char%5B%5D,int,int)</a><br>
[4] - <a href="https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/nio/X-Buffer.java.template#L953-L985" id="OWA6920c9f9-feac-e4d7-9920-f4f9429ac74e" class="OWAAutoLink" data-auth="NotApplicable">
https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/nio/X-Buffer.java.template#L953-L985</a><br>
[5] - <a href="https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/nio/X-Buffer.java.template#L1152-L1156" id="OWA15ca8c62-a604-da36-aec0-822d21dda3a3" class="OWAAutoLink" data-auth="NotApplicable">
https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/nio/X-Buffer.java.template#L1152-L1156</a></div>
</body>
</html>