org.apache.lucene.facet.index
Class CategoryListPayloadStream

java.lang.Object
  extended by org.apache.lucene.facet.index.CategoryListPayloadStream

public class CategoryListPayloadStream
extends Object

Accumulates category IDs for a single document, for writing in byte array form, for example, to a Lucene Payload.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
CategoryListPayloadStream(IntEncoder encoder)
          Creates a Payload stream using the specified encoder.
 
Method Summary
 void appendIntToStream(int intValue)
          Appends an integer to the stream.
 byte[] convertStreamToByteArray()
          Returns the streamed bytes so far accumulated, as an array of bytes.
 void reset()
          Resets this stream to begin building a new payload.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoryListPayloadStream

public CategoryListPayloadStream(IntEncoder encoder)
Creates a Payload stream using the specified encoder.

Method Detail

appendIntToStream

public void appendIntToStream(int intValue)
                       throws IOException
Appends an integer to the stream.

Throws:
IOException

convertStreamToByteArray

public byte[] convertStreamToByteArray()
Returns the streamed bytes so far accumulated, as an array of bytes.


reset

public void reset()
           throws IOException
Resets this stream to begin building a new payload.

Throws:
IOException


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