1/* GENERATED SOURCE. DO NOT MODIFY. */ 2// © 2016 and later: Unicode, Inc. and others. 3// License & terms of use: http://www.unicode.org/copyright.html#License 4/** 5******************************************************************************* 6* Copyright (C) 2005-2012, International Business Machines Corporation and * 7* others. All Rights Reserved. * 8******************************************************************************* 9*/ 10package android.icu.text; 11 12/** 13 * Abstract class for recognizing a single charset. 14 * Part of the implementation of ICU's CharsetDetector. 15 * 16 * Each specific charset that can be recognized will have an instance 17 * of some subclass of this class. All interaction between the overall 18 * CharsetDetector and the stuff specific to an individual charset happens 19 * via the interface provided here. 20 * 21 * Instances of CharsetDetector DO NOT have or maintain 22 * state pertaining to a specific match or detect operation. 23 * The WILL be shared by multiple instances of CharsetDetector. 24 * They encapsulate const charset-specific information. 25 */ 26abstract class CharsetRecognizer { 27 /** 28 * Get the IANA name of this charset. 29 * @return the charset name. 30 */ 31 abstract String getName(); 32 33 /** 34 * Get the ISO language code for this charset. 35 * @return the language code, or <code>null</code> if the language cannot be determined. 36 */ 37 public String getLanguage() 38 { 39 return null; 40 } 41 42 /** 43 * Test the match of this charset with the input text data 44 * which is obtained via the CharsetDetector object. 45 * 46 * @param det The CharsetDetector, which contains the input text 47 * to be checked for being in this charset. 48 * @return A CharsetMatch object containing details of match 49 * with this charset, or null if there was no match. 50 */ 51 abstract CharsetMatch match(CharsetDetector det); 52 53} 54