verifyAndCopyIndexHeader
Expert: verifies the incoming IndexInput has an index header and that its segment ID matches the expected one, and then copies that index header into the provided [ ]. This is useful when building compound files.
Parameters
in
Input stream, positioned at the point where the index header was previously written. Typically this is located at the beginning of the file.
out
Output stream, where the header will be copied to.
expectedID
Expected segment ID
Throws
If the first four bytes are not .CODEC_MAGIC, or if the expectedID does not match.
IOException
If there is an I/O error reading from the underlying medium.