Package org.apache.lucene.facet.index
Class CategoryListPayloadStream
- java.lang.Object
-
- 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
Constructors Constructor Description CategoryListPayloadStream(IntEncoder encoder)
Creates a Payload stream using the specified encoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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
-
-