mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8342650: Move getChars to DecimalDigits
Reviewed-by: liach
This commit is contained in:
parent
ca69a53b76
commit
e1d684c645
12 changed files with 405 additions and 376 deletions
|
@ -23,6 +23,8 @@
|
|||
|
||||
package java.lang;
|
||||
|
||||
import jdk.internal.util.DecimalDigits;
|
||||
|
||||
/**
|
||||
* A helper class to get access to package-private members
|
||||
*/
|
||||
|
@ -117,11 +119,17 @@ public class Helper {
|
|||
}
|
||||
|
||||
public static int getChars(int i, int begin, int end, byte[] value) {
|
||||
return StringUTF16.getChars(i, begin, end, value);
|
||||
StringUTF16.checkBoundsBeginEnd(begin, end, value);
|
||||
int pos = DecimalDigits.getCharsUTF16(i, end, value);
|
||||
assert begin == pos;
|
||||
return pos;
|
||||
}
|
||||
|
||||
public static int getChars(long l, int begin, int end, byte[] value) {
|
||||
return StringUTF16.getChars(l, begin, end, value);
|
||||
StringUTF16.checkBoundsBeginEnd(begin, end, value);
|
||||
int pos = DecimalDigits.getCharsUTF16(l, end, value);
|
||||
assert begin == pos;
|
||||
return pos;
|
||||
}
|
||||
|
||||
public static boolean contentEquals(byte[] v1, byte[] v2, int len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue