Package com.biglybt.core.internat
Class LocaleUtil
- java.lang.Object
-
- com.biglybt.core.internat.LocaleUtil
-
public class LocaleUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private LocaleUtilDecoder[]
all_decoders
private LocaleUtilDecoder
fallback_decoder
private LocaleUtilDecoder[]
general_decoders
protected static java.nio.charset.Charset[]
generalCharsets
private static java.lang.String[]
manual_charset
private static LocaleUtil
singleton
private LocaleUtilDecoder
system_decoder
private static java.nio.charset.Charset
systemEncoding
Android note: The Android platform default is always UTF-8.
-
Constructor Summary
Constructors Modifier Constructor Description private
LocaleUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<LocaleUtilDecoderCandidate>
getCandidates(byte[] array)
Determine which locales are candidates for handling the supplied type of stringLocaleUtilDecoder[]
getDecoders()
LocaleUtilDecoder
getFallBackDecoder()
LocaleUtilDecoder[]
getGeneralDecoders()
static LocaleUtil
getSingleton()
LocaleUtilDecoder
getSystemDecoder()
java.nio.charset.Charset
getSystemEncoding()
-
-
-
Field Detail
-
systemEncoding
private static final java.nio.charset.Charset systemEncoding
Android note: The Android platform default is always UTF-8.
-
manual_charset
private static final java.lang.String[] manual_charset
-
generalCharsets
protected static final java.nio.charset.Charset[] generalCharsets
-
singleton
private static final LocaleUtil singleton
-
all_decoders
private final LocaleUtilDecoder[] all_decoders
-
general_decoders
private final LocaleUtilDecoder[] general_decoders
-
system_decoder
private LocaleUtilDecoder system_decoder
-
fallback_decoder
private final LocaleUtilDecoder fallback_decoder
-
-
Method Detail
-
getSingleton
public static LocaleUtil getSingleton()
-
getSystemEncoding
public java.nio.charset.Charset getSystemEncoding()
-
getDecoders
public LocaleUtilDecoder[] getDecoders()
-
getGeneralDecoders
public LocaleUtilDecoder[] getGeneralDecoders()
-
getFallBackDecoder
public LocaleUtilDecoder getFallBackDecoder()
-
getSystemDecoder
public LocaleUtilDecoder getSystemDecoder()
-
getCandidates
protected java.util.List<LocaleUtilDecoderCandidate> getCandidates(byte[] array)
Determine which locales are candidates for handling the supplied type of string- Parameters:
array
- String in an byte array- Returns:
- list of candidates. All candidates have getDecoder() non-null
-
-