-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
-
7
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
Charset.availableCharsets() returns completely initialized charset, which is an expensive operation.
I propose to additionally provide a set/list which only contains the names of the supported charsets.
JUSTIFICATION :
Charset.availableCharsets() is an performance and memory expensive operation.
In many cases just providing the names should suffice.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
provides a list/set of names, optionally including all aliases, of supported charsets.
---------- BEGIN SOURCE ----------
public class Charset {
/**
* Returns a list of the names of currently available charsets
* with or without valid aliases in case insensitive order.
*/
public static List<String> supportedCharsets(boolean withAliases);
/**
* Returns a list of arrays containing the aliases of currently available charsets
* in same order than canonical names without aliases from supportedCharsets.
*/
public static List<String[]> supportedAliases();
...
}
---------- END SOURCE ----------
Charset.availableCharsets() returns completely initialized charset, which is an expensive operation.
I propose to additionally provide a set/list which only contains the names of the supported charsets.
JUSTIFICATION :
Charset.availableCharsets() is an performance and memory expensive operation.
In many cases just providing the names should suffice.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
provides a list/set of names, optionally including all aliases, of supported charsets.
---------- BEGIN SOURCE ----------
public class Charset {
/**
* Returns a list of the names of currently available charsets
* with or without valid aliases in case insensitive order.
*/
public static List<String> supportedCharsets(boolean withAliases);
/**
* Returns a list of arrays containing the aliases of currently available charsets
* in same order than canonical names without aliases from supportedCharsets.
*/
public static List<String[]> supportedAliases();
...
}
---------- END SOURCE ----------