com.twitter.common.text.util
Class CharSequenceTermAttributeSerializer

java.lang.Object
  extended by com.twitter.common.text.util.CharSequenceTermAttributeSerializer
All Implemented Interfaces:
TokenStreamSerializer.AttributeSerializer

public class CharSequenceTermAttributeSerializer
extends Object
implements TokenStreamSerializer.AttributeSerializer

(De)Serializes {@link CharSequenceTermAttribute).


Constructor Summary
CharSequenceTermAttributeSerializer()
           
 
Method Summary
 void deserialize(TokenStreamSerializer.AttributeInputStream input, CharSequence charSequence)
          Deserializes a single attribute.
 void initialize(org.apache.lucene.util.AttributeSource attributeSource, TokenStreamSerializer.Version version)
          Initialises this AttributeSerializer.
 void serialize(TokenStreamSerializer.AttributeOutputStream output)
          Serializes a single attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharSequenceTermAttributeSerializer

public CharSequenceTermAttributeSerializer()
Method Detail

initialize

public void initialize(org.apache.lucene.util.AttributeSource attributeSource,
                       TokenStreamSerializer.Version version)
                throws IOException
Description copied from interface: TokenStreamSerializer.AttributeSerializer
Initialises this AttributeSerializer. This method should be used to get the attribute instance from the TokenStream that this serializer handles. E.g.: CharSequenceTermAttribute termAtt = attributeSource.addAttribute(CharSequenceTermAttribute.class);

Specified by:
initialize in interface TokenStreamSerializer.AttributeSerializer
Throws:
IOException

serialize

public void serialize(TokenStreamSerializer.AttributeOutputStream output)
               throws IOException
Description copied from interface: TokenStreamSerializer.AttributeSerializer
Serializes a single attribute.

Specified by:
serialize in interface TokenStreamSerializer.AttributeSerializer
Throws:
IOException

deserialize

public void deserialize(TokenStreamSerializer.AttributeInputStream input,
                        CharSequence charSequence)
                 throws IOException
Description copied from interface: TokenStreamSerializer.AttributeSerializer
Deserializes a single attribute.

Specified by:
deserialize in interface TokenStreamSerializer.AttributeSerializer
Throws:
IOException