Package morfologik.fsa
Class FSAHeader
- java.lang.Object
-
- morfologik.fsa.FSAHeader
-
public final class FSAHeader extends Object
Standard FSA file header, as described infsa
package documentation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FSAHeader
read(InputStream in)
Read FSA header and version from a stream, consuming read bytes.static void
write(OutputStream os, byte version)
Writes FSA magic bytes and version information.
-
-
-
Method Detail
-
read
public static FSAHeader read(InputStream in) throws IOException
Read FSA header and version from a stream, consuming read bytes.- Parameters:
in
- The input stream to read data from.- Returns:
- Returns a valid
FSAHeader
with 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 FSA magic bytes and version information.- Parameters:
os
- The stream to write to.version
- Automaton version.- Throws:
IOException
- Rethrown if writing fails.
-
-