org.apache.lucene.analysis.payloads
Class IdentityEncoder

java.lang.Object
  extended by org.apache.lucene.analysis.payloads.AbstractEncoder
      extended by 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
protected  Charset charset
           
 
Constructor Summary
IdentityEncoder()
           
IdentityEncoder(Charset charset)
           
 
Method Summary
 BytesRef encode(char[] buffer, int offset, int length)
          Convert a char array to a BytesRef
 
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 Charset charset
Constructor Detail

IdentityEncoder

public IdentityEncoder()

IdentityEncoder

public IdentityEncoder(Charset charset)
Method Detail

encode

public BytesRef encode(char[] buffer,
                       int offset,
                       int length)
Description copied from interface: PayloadEncoder
Convert a char array to a BytesRef

Specified by:
encode in interface PayloadEncoder
Returns:
encoded BytesRef


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