- java.lang.Object
-
- de.ibapl.jnhw.posix.Locale
-
@Include("#include <locale.h>") public class Locale extends Object
Wrapper around the<aio.h>header. See specs at: locale.h - category macros.- Author:
- aploese
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocale.LconvPOSIX:structure lconv.static classLocale.Locale_tPOSIX:typedef locale_t.
-
Field Summary
Fields Modifier and Type Field Description static booleanHAVE_LOCALE_Hstatic intLC_ALLPOSIX: XXXstatic intLC_ALL_MASKPOSIX: XXXstatic intLC_COLLATEPOSIX: XXXstatic intLC_COLLATE_MASKPOSIX: XXXstatic intLC_CTYPEPOSIX: XXXstatic intLC_CTYPE_MASKPOSIX: XXXstatic Locale.Locale_tLC_GLOBAL_LOCALEPOSIX: XXXstatic intLC_MESSAGESPOSIX: XXXstatic intLC_MESSAGES_MASKPOSIX: XXXstatic intLC_MONETARYThe LC_MONETARY category shall define the rules and symbols that are used to format monetary numeric information.static intLC_MONETARY_MASKThe LC_MONETARY category shall define the rules and symbols that are used to format monetary numeric information.static intLC_NUMERICPOSIX: XXXstatic intLC_NUMERIC_MASKPOSIX: XXXstatic intLC_TIMEPOSIX: XXXstatic intLC_TIME_MASKPOSIX: XXX
-
Constructor Summary
Constructors Constructor Description Locale()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Locale.Locale_tduplocale(Locale.Locale_t locobj)static voidfreelocale(Locale.Locale_t locobj)static Locale.Lconvlocaleconv()static Locale.Locale_tnewlocale(int category_mask, String locale, Locale.Locale_t base)static Stringsetlocale(int category, String locale)POSIX: setlocale - set program locale.static Locale.Locale_tuselocale(Locale.Locale_t newloc)
-
-
-
Field Detail
-
HAVE_LOCALE_H
public static final boolean HAVE_LOCALE_H
-
LC_ALL
@Define public static final int LC_ALL
POSIX: XXX
-
LC_ALL_MASK
@Define public static final int LC_ALL_MASK
POSIX: XXX
-
LC_COLLATE
@Define public static final int LC_COLLATE
POSIX: XXX
-
LC_COLLATE_MASK
@Define public static final int LC_COLLATE_MASK
POSIX: XXX
-
LC_CTYPE
@Define public static final int LC_CTYPE
POSIX: XXX
-
LC_CTYPE_MASK
@Define public static final int LC_CTYPE_MASK
POSIX: XXX
-
LC_GLOBAL_LOCALE
@Define public static final Locale.Locale_t LC_GLOBAL_LOCALE
POSIX: XXX
-
LC_MESSAGES
@Define public static final int LC_MESSAGES
POSIX: XXX
-
LC_MESSAGES_MASK
@Define public static final int LC_MESSAGES_MASK
POSIX: XXX
-
LC_MONETARY
@Define public static final int LC_MONETARY
The LC_MONETARY category shall define the rules and symbols that are used to format monetary numeric information. POSIX:LC_MONETARY.
-
LC_MONETARY_MASK
@Define public static final int LC_MONETARY_MASK
The LC_MONETARY category shall define the rules and symbols that are used to format monetary numeric information. POSIX:LC_MONETARY.
-
LC_NUMERIC
@Define public static final int LC_NUMERIC
POSIX: XXX
-
LC_NUMERIC_MASK
@Define public static final int LC_NUMERIC_MASK
POSIX: XXX
-
LC_TIME
@Define public static final int LC_TIME
POSIX: XXX
-
LC_TIME_MASK
@Define public static final int LC_TIME_MASK
POSIX: XXX
-
-
Method Detail
-
duplocale
public static final Locale.Locale_t duplocale(Locale.Locale_t locobj) throws NativeErrorException
- Parameters:
locobj- a valid locale object handle.- Returns:
- a copy of
locobj - Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
freelocale
public static final void freelocale(Locale.Locale_t locobj)
- Parameters:
locobj- a valid locale object handle.
-
localeconv
public static final Locale.Lconv localeconv()
- Returns:
- The localeconv() function shall return a pointer to the filled-in object.
-
newlocale
public static final Locale.Locale_t newlocale(int category_mask, String locale, Locale.Locale_t base) throws NativeErrorException
- Parameters:
category_mask- the locale categories to be set or modified.locale- the locale from which the data specified in category_mask is taken.base- the base locale object handle to be used.- Returns:
- on successful completion, a valid locale object handle.
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
setlocale
public static final String setlocale(int category, String locale)
POSIX: setlocale - set program locale.- Parameters:
category- the category to set.locale- the locale to use for the givencategory- Returns:
- on successful completion, the string associated with the
specified category for the new locale. otherwise
null
-
uselocale
public static final Locale.Locale_t uselocale(Locale.Locale_t newloc) throws NativeErrorException
- Parameters:
newloc- the new thread-local locale to set. If 0 nothing will be changed, but the current locale is returned.- Returns:
- a handle for the thread-local locale that was in use as the current locale for the calling thread on entry to the function, or LC_GLOBAL_LOCALE if no thread-local locale was in use.
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
-