This method is a horrible kluge solving the problem of terms appearing in all documents: {@link BitStreamIndexWriter} would not write pointers in this case, but we do not know whether we will need pointers or not while we are filling the internal buffer. Thus, for those (hopefully few) termas appearing in all documents this method can be used to dump the internal buffer stripping all pointers.
Note that the valid number of bits should be retrieved using {@link #writtenBits()}after a {@link #flush()}. Then, a call to {@link #align()} will dump to the bufferthe bits still floating in the bit buffer; at that point this method can be called safely. @param obs an output bit stream. @param bitLength the number of bits to be scanned. @throws IOException
|
|