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
IOExceptionpublic PayloadIterator(IndexReader indexReader, Term term, byte[] buffer) throws IOException
IOExceptionpublic boolean init()
throws IOException
setdoc(int). Returns false if there is no category list found
(no setdoc() will never return true).IOExceptionpublic boolean setdoc(int docId)
throws IOException
Users should call this method with increasing docIds, and implementations can assume that this is the case.
IOExceptionpublic byte[] getBuffer()
public int getPayloadLength()