public class StarDict extends java.lang.Object implements IDictionaryFactory
StarDict format described on http://code.google.com/p/babiloo/wiki/StarDict_format
Constructor and Description |
---|
StarDict() |
Modifier and Type | Method and Description |
---|---|
boolean |
isSupportedFile(java.io.File file)
Determine whether or not the supplied file is supported by this factory.
|
IDictionary |
loadDict(java.io.File file)
Load the given file and return an
IDictionary that wraps it. |
IDictionary |
loadDict(java.io.File ifoFile,
Language language)
Load the given file and return an
IDictionary that wraps it. |
public boolean isSupportedFile(java.io.File file)
IDictionaryFactory
isSupportedFile
in interface IDictionaryFactory
file
- The file to checkpublic IDictionary loadDict(java.io.File file) throws java.lang.Exception
IDictionaryFactory
IDictionary
that wraps it.
Deprecated; use IDictionaryFactory.loadDict(File, Language)
instead.loadDict
in interface IDictionaryFactory
file
- The file to loadjava.lang.Exception
- If the file could not be loaded for reasons that were not
determined by IDictionaryFactory.isSupportedFile(File)
public IDictionary loadDict(java.io.File ifoFile, Language language) throws java.lang.Exception
IDictionaryFactory
IDictionary
that wraps it. The
supplied file is guaranteed to have returned true from
IDictionaryFactory.isSupportedFile(File)
.loadDict
in interface IDictionaryFactory
ifoFile
- The file to loadlanguage
- The language of the dictionary's index (e.g. English for an
English-French dictionary)java.lang.Exception
- If the file could not be loaded for reasons that were not
determined by IDictionaryFactory.isSupportedFile(File)