Class StarDict

  • All Implemented Interfaces:
    IDictionaryFactory

    public class StarDict
    extends java.lang.Object
    implements IDictionaryFactory
    StarDict Dictionary support.

    StarDict format described on https://github.com/huzheng001/stardict-3/blob/master/dict/doc/StarDictFileFormat

    A StarDict dictionary plugin uses stardict4j access library. Every dictionary consists of these files:

    1. somedict.ifo
    2. somedict.idx or somedict.idx.gz
    3. somedict.dict or somedict.dict.dz
    4. somedict.syn (optional)
    This driver handle entry types 'm': mean, 'h': html and 't': phonetics. Other entries such as MediaWiki markup are not shown.
    • Constructor Detail

      • StarDict

        public StarDict()
    • Method Detail

      • loadPlugins

        public static void loadPlugins()
        Plugin loader.
      • unloadPlugins

        public static void unloadPlugins()
        Plugin unloader.
      • isSupportedFile

        public boolean isSupportedFile​(java.io.File file)
        Description copied from interface: IDictionaryFactory
        Determine whether or not the supplied file is supported by this factory. This is intended to be a lightweight check, e.g. looking for a file extension.
        Specified by:
        isSupportedFile in interface IDictionaryFactory
        Parameters:
        file - The file to check
        Returns:
        Whether or not the file is supported