EnhancementsPayloadIteratorpublic class PayloadIterator extends Object
| Modifier and Type | Field | Description |
|---|---|---|
protected byte[] |
buffer |
|
protected int |
payloadLength |
| Constructor | Description |
|---|---|
PayloadIterator(IndexReader indexReader,
Term term) |
|
PayloadIterator(IndexReader indexReader,
Term term,
byte[] buffer) |
| Modifier and Type | Method | 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()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.