| Modifier and Type | Method and Description |
|---|---|
void |
addWord(String word)
Adds a word to the runtime dictionary.
|
void |
destroy()
Deallocate the dictionary.
|
String |
getWordChars()
Used to query what are word-characters
|
boolean |
misspelled(String word)
Check if a word is spelled correctly
|
protected byte[] |
stringToBytes(String str)
Convert a Java string to a zero terminated byte array, in the
encoding of the dictionary, as expected by the hunspell functions.
|
List<String> |
suggest(String word)
Returns a list of suggestions
|
public void destroy()
public String getWordChars()
public boolean misspelled(String word)
word - The word to check.protected byte[] stringToBytes(String str) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic List<String> suggest(String word) throws CharacterCodingException
word - The word to check and offer suggestions forCharacterCodingExceptionpublic void addWord(String word) throws UnsupportedEncodingException
word - Word to be added.UnsupportedEncodingException