Top Description Fields Constructors Methods
jdk.internal.util

public final Class OctalDigits

extends Object
Class Inheritance
Imports
jdk.internal.access.JavaLangAccess, .SharedSecrets, jdk.internal.vm.annotation.Stable

Digits class for octal digits.
Since
21

Field Summary

Modifier and TypeField and Description
private static final short[]
private static final JavaLangAccess

Constructor Summary

AccessConstructor and Description
private
OctalDigits()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the last index used
getCharsLatin1
(long
value to convert
value
,
int
insert point + 1
index
,
byte[]
byte buffer to copy into
buffer
)

Insert digits for long value in buffer from high index to low index.

public static int

Returns:

the last index used
getCharsUTF16
(long
value to convert
value
,
int
insert point + 1
index
,
byte[]
byte buffer to copy into
buffer
)

This is a variant of OctalDigits#getCharsLatin1(long, int, byte[]), but for UTF-16 coder.

public static int

Returns:

number of digits
stringSize
(long
value to convert
value
)

Calculate the number of digits required to represent the long.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DIGITSback to summary
private static final short[] DIGITS
Annotations
@Stable
JLAback to summary
private static final JavaLangAccess JLA

Constructor Detail

OctalDigitsback to summary
private OctalDigits()

Constructor.

Method Detail

getCharsLatin1back to summary
public static int getCharsLatin1(long value, int index, byte[] buffer)

Insert digits for long value in buffer from high index to low index.

Parameters
value:long

value to convert

index:int

insert point + 1

buffer:byte[]

byte buffer to copy into

Returns:int

the last index used

getCharsUTF16back to summary
public static int getCharsUTF16(long value, int index, byte[] buffer)

This is a variant of OctalDigits#getCharsLatin1(long, int, byte[]), but for UTF-16 coder.

Parameters
value:long

value to convert

index:int

insert point + 1

buffer:byte[]

byte buffer to copy into

Returns:int

the last index used

stringSizeback to summary
public static int stringSize(long value)

Calculate the number of digits required to represent the long.

Parameters
value:long

value to convert

Returns:int

number of digits