Package com.xmlmind.util

## Class LoadText.EncodingDetectorBase

- java.lang.Object
- - com.xmlmind.util.LoadText.EncodingDetectorBase

- All Implemented Interfaces:
    `LoadText.EncodingDetector`
  Direct Known Subclasses:
    `LoadText.EmacsStyleDetector`, `LoadText.HTMLCharsetDetector`, `LoadText.KeywordBasedDetector`, `LoadText.XMLEncodingDetector`
  Enclosing class:
    LoadText

      public abstract static class LoadText.EncodingDetectorBase
      extends Object
      implements LoadText.EncodingDetector

  A base class which checks for validity the encoding returned by `doDetectEncoding(java.lang.String)`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EncodingDetectorBase()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `detectEncoding​(String asciiHead)` | Parses specified few text lines and returns found encoding if any.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncodingDetectorBase

          public EncodingDetectorBase()

  - ### Method Detail

    - #### detectEncoding

          public String detectEncoding​(String asciiHead)

      Description copied from interface: `LoadText.EncodingDetector`
      Parses specified few text lines and returns found encoding if any.
      Specified by:
        `detectEncoding` in interface `LoadText.EncodingDetector`
      Parameters:
        `asciiHead` - the first lines of a text file.
      Returns:
        found, valid encoding; `null` if not found or invalid.