Class FSTHeader
- java.lang.Object
-
- org.apache.pinot.segment.local.utils.nativefst.FSTHeader
-
public final class FSTHeader extends Object
Standard FST file header, as described inFSTpackage documentation.
-
-
Field Summary
Fields Modifier and Type Field Description static intFST_MAGICFST magic (4 bytes).
-
Method Summary
Modifier and Type Method Description static FSTHeaderread(InputStream in)Read FST header and version from a stream, consuming read bytes.static voidwrite(OutputStream os, byte version)Writes FST magic bytes and version information.
-
-
-
Field Detail
-
FST_MAGIC
public static final int FST_MAGIC
FST magic (4 bytes).- See Also:
- Constant Field Values
-
-
Method Detail
-
read
public static FSTHeader read(InputStream in) throws IOException
Read FST header and version from a stream, consuming read bytes.- Parameters:
in- The input stream to read data from.- Returns:
- Returns a valid
FSTHeaderwith version information. - Throws:
IOException- If the stream ends prematurely or if it contains invalid data.
-
write
public static void write(OutputStream os, byte version) throws IOException
Writes FST magic bytes and version information.- Parameters:
os- The stream to write to.version- Automaton version.- Throws:
IOException- Rethrown if writing fails.
-
-