Package 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
AnIntDecoderwhich wraps anotherIntDecoderand reverts the d-gap that was encoded byDGapIntEncoder. 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.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
-
-
Constructor Summary
Constructors Constructor Description DGapIntDecoder(IntDecoder decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longdecode()Decodes data received from the input stream, and returns one decoded integer.voidreInit(InputStream in)Sets the input stream from which the encoded data is read.StringtoString()
-
-
-
Constructor Detail
-
DGapIntDecoder
public DGapIntDecoder(IntDecoder decoder)
-
-
Method Detail
-
decode
public long decode() throws IOExceptionDescription copied from class:IntDecoderDecodes data received from the input stream, and returns one decoded integer. If end of stream is reached,IntDecoder.EOSis returned.- Specified by:
decodein classIntDecoder- Returns:
- one decoded integer as long or
IntDecoder.EOSif end-of-stream reached. - Throws:
IOException- if an I/O error occurs
-
reInit
public void reInit(InputStream in)
Description copied from class:IntDecoderSets the input stream from which the encoded data is read.- Overrides:
reInitin classIntDecoder
-
-