org.apache.lucene.analysis.payloads

## Class IdentityEncoder

- java.lang.Object
- - org.apache.lucene.analysis.payloads.AbstractEncoder
  - - org.apache.lucene.analysis.payloads.IdentityEncoder

- All Implemented Interfaces:
    PayloadEncoder

      public class IdentityEncoder
      extends AbstractEncoder
      implements PayloadEncoder

  Does nothing other than convert the char array to a byte array using the specified encoding.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.nio.charset.Charset` | `charset`
    `protected java.lang.String` | `charsetName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdentityEncoder()`
    `IdentityEncoder(java.nio.charset.Charset charset)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Payload` | `encode(char[] buffer, int offset, int length)` Convert a char array to a `Payload`

    - ### Methods inherited from class org.apache.lucene.analysis.payloads.AbstractEncoder

      `encode`

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

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

    - ### Methods inherited from interface org.apache.lucene.analysis.payloads.PayloadEncoder

      `encode`

- - ### Field Detail

    - #### charset

          protected java.nio.charset.Charset charset

    - #### charsetName

          protected java.lang.String charsetName

  - ### Constructor Detail

    - #### IdentityEncoder

          public IdentityEncoder()

    - #### IdentityEncoder

          public IdentityEncoder(java.nio.charset.Charset charset)

  - ### Method Detail

    - #### encode

          public Payload encode(char[] buffer,
                                int offset,
                                int length)

      Description copied from interface: `PayloadEncoder`
      Convert a char array to a `Payload`
      Specified by:
        `encode` in interface `PayloadEncoder`
      Returns:
        encoded `Payload`

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