public class Hunspell extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Hunspell.Dictionary
Class representing a single dictionary.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Hunspell(String libDir)
Constructor for the library, loads the native lib.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroyDictionary(String baseFileName)
Removes a dictionary from the internal cache
|
Hunspell.Dictionary |
getDictionary(String baseFileName)
Gets an instance of the dictionary.
|
static Hunspell |
getInstance()
The instance of the HunspellManager, looks for the native lib in the
default directories
|
static Hunspell |
getInstance(String libDir)
The instance of the HunspellManager, looks for the native lib in
the directory specified.
|
String |
getLibFile() |
static String |
libName()
Calculate the filename of the native hunspell lib.
|
static String |
libNameBare() |
protected void |
tryLoad(String libFile) |
protected Hunspell(String libDir) throws UnsatisfiedLinkError, UnsupportedOperationException
libDir - Optional absolute directory where the native lib can be found.UnsupportedOperationException - if the OS or architecture is simply not supported.UnsatisfiedLinkErrorpublic static Hunspell getInstance() throws UnsatisfiedLinkError, UnsupportedOperationException
public static Hunspell getInstance(String libDir) throws UnsatisfiedLinkError, UnsupportedOperationException
libDir - Optional absolute directory where the native lib can be found.UnsatisfiedLinkErrorUnsupportedOperationExceptionprotected void tryLoad(String libFile) throws UnsupportedOperationException
UnsupportedOperationExceptionpublic String getLibFile()
public static String libName() throws UnsupportedOperationException
UnsupportedOperationExceptionpublic static String libNameBare() throws UnsupportedOperationException
UnsupportedOperationExceptionpublic Hunspell.Dictionary getDictionary(String baseFileName) throws IOException
baseFileName - the base name of the dictionary,
passing /dict/da_DK means that the files /dict/da_DK.dic
and /dict/da_DK.aff get loadedIOExceptionpublic void destroyDictionary(String baseFileName)
baseFileName - the base name of the dictionary, as passed to
getDictionary()