IT. Expert System.

Android Reference

CharsetUtils


android.util

Class CharsetUtils



  • public final class CharsetUtils
    extends Object

    A class containing utility methods related to character sets. This class is primarily useful for code that wishes to be vendor-aware in its interpretation of Japanese charset names (used in DoCoMo, KDDI, and SoftBank).

    Note: Developers will need to add an appropriate mapping for each vendor-specific charset. You may need to modify the C libraries like icu4c in order to let Android support an additional charset.

    • Method Summary

      Methods
      Modifier and Type Method and Description
      static Charset charsetForVendor(String charsetName)
      Returns the vendor-specific character set corresponding to the given original character set name and default vendor (that is, the targeted vendor of the device this code is running on).
      static Charset charsetForVendor(String charsetName, String vendor)
      Returns the vendor-specific character set corresponding to the given original character set name and vendor.
      static String nameForDefaultVendor(String charsetName)
      Returns the name of the vendor-specific character set corresponding to the given original character set name and the default vendor (that is, the targeted vendor of the device this code is running on).
      static String nameForVendor(String charsetName, String vendor)
      Returns the name of the vendor-specific character set corresponding to the given original character set name and vendor.
    • Method Detail

      • nameForVendor

        public static String nameForVendor(String charsetName,
                           String vendor)
        Returns the name of the vendor-specific character set corresponding to the given original character set name and vendor. If there is no vendor-specific character set for the given name/vendor pair, this returns the original character set name.
        Parameters:
        charsetName - the base character set name
        vendor - the vendor to specialize for. All characters should be lower-cased.
        Returns:
        the specialized character set name, or charsetName if there is no specialized name
      • nameForDefaultVendor

        public static String nameForDefaultVendor(String charsetName)
        Returns the name of the vendor-specific character set corresponding to the given original character set name and the default vendor (that is, the targeted vendor of the device this code is running on). This method merely calls through to nameForVendor(String,String), passing the default vendor as the second argument.
        Parameters:
        charsetName - the base character set name
        Returns:
        the specialized character set name, or charsetName if there is no specialized name
      • charsetForVendor

        public static Charset charsetForVendor(String charsetName,
                               String vendor)
                                        throws UnsupportedCharsetException,
                                               IllegalCharsetNameException
        Returns the vendor-specific character set corresponding to the given original character set name and vendor. If there is no vendor-specific character set for the given name/vendor pair, this returns the character set corresponding to the original name. The vendor name is matched case-insensitively. This method merely calls Charset.forName() on a name transformed by a call to nameForVendor(String,String).
        Parameters:
        charsetName - the base character set name
        vendor - the vendor to specialize for
        Returns:
        the specialized character set, or the one corresponding directly to charsetName if there is no specialized variant
        Throws:
        UnsupportedCharsetException - thrown if the named character set is not supported by the system
        IllegalCharsetNameException - thrown if charsetName has invalid syntax
      • charsetForVendor

        public static Charset charsetForVendor(String charsetName)
                                        throws UnsupportedCharsetException,
                                               IllegalCharsetNameException
        Returns the vendor-specific character set corresponding to the given original character set name and default vendor (that is, the targeted vendor of the device this code is running on). This method merely calls through to charsetForVendor(String,String), passing the default vendor as the second argument.
        Parameters:
        charsetName - the base character set name
        Returns:
        the specialized character set, or the one corresponding directly to charsetName if there is no specialized variant
        Throws:
        UnsupportedCharsetException - thrown if the named character set is not supported by the system
        IllegalCharsetNameException - thrown if charsetName has invalid syntax


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 717 / . Delta: 0.02460 с