org.apache.lucene.util.encoding
Class DGapIntDecoder
java.lang.Object
org.apache.lucene.util.encoding.IntDecoder
org.apache.lucene.util.encoding.DGapIntDecoder
public class DGapIntDecoder
- extends IntDecoder
An IntDecoder
which wraps another IntDecoder
and reverts the
d-gap that was encoded by DGapIntEncoder
. The wrapped decoder
performs the actual decoding, while this class simply adds the decoded value
to the previous value.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder |
EOS, in |
Method Summary |
long |
decode()
Decodes data received from the input stream, and returns one decoded
integer. |
void |
reInit(InputStream in)
Sets the input stream from which the encoded data is read. |
String |
toString()
|
DGapIntDecoder
public DGapIntDecoder(IntDecoder decoder)
decode
public long decode()
throws IOException
- Description copied from class:
IntDecoder
- Decodes data received from the input stream, and returns one decoded
integer. If end of stream is reached,
IntDecoder.EOS
is returned.
- Specified by:
decode
in class IntDecoder
- Returns:
- one decoded integer as long or
IntDecoder.EOS
if end-of-stream
reached.
- Throws:
IOException
- if an I/O error occurs
reInit
public void reInit(InputStream in)
- Description copied from class:
IntDecoder
- Sets the input stream from which the encoded data is read.
- Overrides:
reInit
in class IntDecoder
toString
public String toString()
- Overrides:
toString
in class Object