public class PayloadIterator extends Object
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
protected int |
payloadLength |
Constructor and Description |
---|
PayloadIterator(IndexReader indexReader,
Term term) |
PayloadIterator(IndexReader indexReader,
Term term,
byte[] buffer) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBuffer()
Get the buffer with the content of the last read payload.
|
int |
getPayloadLength()
Get the length of the last read payload.
|
boolean |
init()
(re)initialize the iterator.
|
boolean |
setdoc(int docId)
Skip forward to document docId.
|
public PayloadIterator(IndexReader indexReader, Term term) throws IOException
IOException
public PayloadIterator(IndexReader indexReader, Term term, byte[] buffer) throws IOException
IOException
public boolean init() throws IOException
setdoc(int)
. Returns false if there is no category list found
(no setdoc() will never return true).IOException
public boolean setdoc(int docId) throws IOException
Users should call this method with increasing docIds, and implementations can assume that this is the case.
IOException
public byte[] getBuffer()
public int getPayloadLength()