org.apache.lucene.analysis

## Class MappingCharFilter

- java.lang.Object
- - java.io.Reader
  - - org.apache.lucene.analysis.CharStream
    - - org.apache.lucene.analysis.CharFilter
      - - org.apache.lucene.analysis.BaseCharFilter
        - - org.apache.lucene.analysis.MappingCharFilter

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable

      public class MappingCharFilter
      extends BaseCharFilter

  Simplistic `CharFilter` that applies the mappings contained in a `NormalizeCharMap` to the character stream, and correcting the resulting changes to the offsets.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.analysis.CharFilter

      `input`

    - ### Fields inherited from class java.io.Reader

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MappingCharFilter(NormalizeCharMap normMap, CharStream in)` Default constructor that takes a `CharStream`.
    `MappingCharFilter(NormalizeCharMap normMap, java.io.Reader in)` Easy-use constructor that takes a `Reader`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `read()`
    `int` | `read(char[] cbuf, int off, int len)`

    - ### Methods inherited from class org.apache.lucene.analysis.BaseCharFilter

      `addOffCorrectMap, correct, getLastCumulativeDiff`

    - ### Methods inherited from class org.apache.lucene.analysis.CharFilter

      `close, correctOffset, mark, markSupported, reset`

    - ### Methods inherited from class java.io.Reader

      `read, read, ready, skip`

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

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

- - ### Constructor Detail

    - #### MappingCharFilter

          public MappingCharFilter(NormalizeCharMap normMap,
                                   CharStream in)

      Default constructor that takes a `CharStream`.

    - #### MappingCharFilter

          public MappingCharFilter(NormalizeCharMap normMap,
                                   java.io.Reader in)

      Easy-use constructor that takes a `Reader`.

  - ### Method Detail

    - #### read

          public int read()
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.Reader`
      Throws:
        `java.io.IOException`

    - #### read

          public int read(char[] cbuf,
                          int off,
                          int len)
                   throws java.io.IOException

      Overrides:
        `read` in class `CharFilter`
      Throws:
        `java.io.IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.