public final class FSAHeader
extends java.lang.Object
fsa package
documentation.| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
FSA_MAGIC
FSA magic (4 bytes).
|
(package private) static int |
MAX_HEADER_LENGTH
Maximum length of the header block.
|
(package private) byte |
version
FSA version number.
|
| Constructor and Description |
|---|
FSAHeader(byte version) |
| Modifier and Type | Method and Description |
|---|---|
static FSAHeader |
read(java.io.InputStream in)
Read FSA header and version from a stream, consuming read bytes.
|
static void |
write(java.io.OutputStream os,
byte version)
Writes FSA magic bytes and version information.
|
static final int FSA_MAGIC
static final int MAX_HEADER_LENGTH
final byte version
public static FSAHeader read(java.io.InputStream in) throws java.io.IOException
in - The input stream to read data from.FSAHeader with version information.java.io.IOException - If the stream ends prematurely or if it contains invalid data.public static void write(java.io.OutputStream os,
byte version)
throws java.io.IOException
os - The stream to write to.version - Automaton version.java.io.IOException - Rethrown if writing fails.