Package | Description |
---|---|
java.io |
Input/Output support
|
java.text |
Provides classes and interfaces for handling text, dates, numbers, and messages
in a manner independent of natural languages.
|
java.util |
Utilities
|
Modifier and Type | Method and Description |
---|---|
PrintStream |
PrintStream.format(Locale locale,
String format,
Object... args) |
PrintStream |
PrintStream.printf(Locale locale,
String format,
Object... args) |
Modifier and Type | Method and Description |
---|---|
static NumberFormat |
NumberFormat.getInstance(Locale inLocale)
Returns a general-purpose number format for the specified locale.
|
static NumberFormat |
NumberFormat.getIntegerInstance(Locale inLocale)
Returns an integer number format for the specified locale.
|
static NumberFormat |
NumberFormat.getNumberInstance(Locale inLocale)
Returns a general-purpose number format for the specified locale.
|
static NumberFormat |
NumberFormat.getPercentInstance(Locale inLocale)
Returns a percentage format for the specified locale.
|
Modifier and Type | Field and Description |
---|---|
static Locale |
Locale.ROOT
The root locale, used as the base case in lookups by
locale-sensitive operations.
|
static Locale |
Locale.US
Locale which represents the United States.
|
Modifier and Type | Method and Description |
---|---|
static Locale[] |
Locale.getAvailableLocales()
Returns the list of available locales.
|
static Locale |
Locale.getDefault()
Returns the default Locale.
|
static Locale |
Locale.getFallbackLocale(Locale locale)
This method is used by the localized name lookup methods to
retrieve the next locale to try.
|
Locale |
Formatter.locale()
Returns the locale used by this formatter.
|
Modifier and Type | Method and Description |
---|---|
Formatter |
Formatter.format(Locale loc,
String fmt,
Object... args)
Outputs a formatted string based on the supplied specification,
fmt , and its arguments using the specified locale. |
String |
Locale.getDisplayCountry(Locale inLocale)
Gets the name of the country specified by this locale, in a form suitable
for display to the user.
|
String |
Locale.getDisplayLanguage(Locale inLocale)
Gets the name of the language specified by this locale, in a form suitable
for display to the user.
|
String |
Locale.getDisplayName(Locale locale)
Gets all local components suitable for display to the user, formatted
for a specified locale.
|
String |
Locale.getDisplayVariant(Locale inLocale)
Gets the name of the variant specified by this locale, in a form suitable
for display to the user.
|
static Locale |
Locale.getFallbackLocale(Locale locale)
This method is used by the localized name lookup methods to
retrieve the next locale to try.
|
static Calendar |
Calendar.getInstance(Locale aLocale)
Gets a calendar using the default time zone and specified locale.
|
static void |
Locale.setDefault(Locale newLocale)
Changes the default locale.
|
Constructor and Description |
---|
Formatter(Appendable app,
Locale loc)
Constructs a new
Formatter using the specified
locale and the specified output stream. |
Formatter(File file,
String charset,
Locale loc)
Constructs a new
Formatter using the specified
file as the output stream with the supplied character set
and locale. |
Formatter(Locale loc)
Constructs a new
Formatter using the specified
locale and a StringBuilder as the output stream. |
Formatter(OutputStream out,
String charset,
Locale loc)
Constructs a new
Formatter using the specified
output stream with the supplied character set and locale. |
Formatter(String file,
String charset,
Locale loc)
Constructs a new
Formatter using the specified
file as the output stream with the supplied character set
and locale. |