Package org.apache.lucene.util.encoding
Class EightFlagsIntDecoder
- java.lang.Object
-
- org.apache.lucene.util.encoding.IntDecoder
-
- org.apache.lucene.util.encoding.EightFlagsIntDecoder
-
public class EightFlagsIntDecoder extends IntDecoder
Decodes data which was encoded byEightFlagsIntEncoder
. Scans theindicator
, one flag (1-bits) at a time, and decodes extra data usingVInt8IntDecoder
.- See Also:
EightFlagsIntEncoder
- 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 EightFlagsIntDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
-
-
Method Detail
-
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 classIntDecoder
- 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 classIntDecoder
-
-