/** * Reads header from stream and checks if it matches trie header * @throws IOException if reading from stream failed */ public void verifyHeader() throws IOException { String readHeader = readString(inStream, TRIE_HEADER.length()); if (!readHeader.equals(TRIE_HEADER)) { throw new Error("Bad binary LM file header: " + readHeader); } }
/** * Reads header from stream and checks if it matches trie header * @throws IOException if reading from stream failed */ public void verifyHeader() throws IOException { String readHeader = readString(inStream, TRIE_HEADER.length()); if (!readHeader.equals(TRIE_HEADER)) { throw new Error("Bad binary LM file header: " + readHeader); } }