All Packages Class Hierarchy This Package Previous Next Index
Class multilizer.BundleDictionary
java.lang.Object
|
+----multilizer.Dictionary
|
+----multilizer.BundleDictionary
- public abstract class BundleDictionary
- extends Dictionary
An abstract dictionary component for all file based dictionary components.
If a file bundle is used the
FileName
property specifies the language file.
Language File format
- See Also:
- BinaryDictionary, TextDictionary, ResourceDictionary
-
LANGUAGE_FILE_EXTENSION
-
-
BundleDictionary()
-
-
addLanguageStreamListener(LanguageStreamListener)
- Adds the specified stream listener to receive language stream aquire events from this dictionary.
-
getFileName()
- Gets the base name of the dictionary.
-
getLanguageCount()
- Gets the amount of the languages in the dictionary.
-
getLanguageData(int)
- Gets the specified language.
-
getLanguageDatas()
- Gets the all languages.
-
getLanguageStream()
- Returns the language stream for the active language data.
-
getLanguageStream(String)
- Opens the language stream and returns it.
-
readLanguage(UnicodeInputStream)
- Reads one language from the given language stream.
-
removeLanguageStreamListener(LanguageStreamListener)
- Removes the stream aquire listener so it no longer receives stream events from this dictionary.
-
setFileName(String)
- Sets the base name of the dictionary.
LANGUAGE_FILE_EXTENSION
public static final String LANGUAGE_FILE_EXTENSION
BundleDictionary
public BundleDictionary()
getLanguageStream
protected UnicodeInputStream getLanguageStream() throws Exception
- Returns the language stream for the active language data.
- Throws: Exception
- An exception
getLanguageStream
protected UnicodeInputStream getLanguageStream(String fileName) throws Exception
- Opens the language stream and returns it.
- Throws: Exception
- An exception
readLanguage
protected Language readLanguage(UnicodeInputStream in) throws Exception
- Reads one language from the given language stream.
- Throws: Exception
- An exception
getLanguageCount
public int getLanguageCount()
- Gets the amount of the languages in the dictionary.
- Overrides:
- getLanguageCount in class Dictionary
getLanguageData
public Language getLanguageData(int index)
- Gets the specified language.
- Overrides:
- getLanguageData in class Dictionary
getLanguageDatas
public Language[] getLanguageDatas()
- Gets the all languages.
- Overrides:
- getLanguageDatas in class Dictionary
setFileName
public void setFileName(String value)
- Sets the base name of the dictionary.
getFileName
public String getFileName()
- Gets the base name of the dictionary.
addLanguageStreamListener
public synchronized void addLanguageStreamListener(LanguageStreamListener l)
- Adds the specified stream listener to receive language stream aquire events from this dictionary.
There can be only one listener at a time.
- Parameters:
- l - the text dictionary listener
removeLanguageStreamListener
public synchronized void removeLanguageStreamListener(LanguageStreamListener l)
- Removes the stream aquire listener so it no longer receives stream events from this dictionary.
All Packages Class Hierarchy This Package Previous Next Index