Package org.daisy.braille.table
Interface BrailleConverter
-
- All Known Implementing Classes:
AdvancedBrailleConverter
,EmbosserBrailleConverter
public interface BrailleConverter
Provides an interface for converting from text to braille and vice verca.- Author:
- Joel HÃ¥kansson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.charset.Charset
getPreferredCharset()
Gets the preferred charset for this braille format when reading/writing as text from/to fileboolean
supportsEightDot()
Returns true if 8-dot braille is supported, false otherwisejava.lang.String
toBraille(java.lang.String text)
Transcodes the given text string as braille.java.lang.String
toText(java.lang.String braille)
Transcodes the given braille into text.
-
-
-
Method Detail
-
toBraille
java.lang.String toBraille(java.lang.String text)
Transcodes the given text string as braille. This may be a one-to-one mapping or a many-to-one depending on the table implementation.- Parameters:
text
-- Returns:
- returns a Unicode string of braille
-
toText
java.lang.String toText(java.lang.String braille)
Transcodes the given braille into text. In most cases this will reverse the effect of toBraille(String text), i.e. text.equals(toText(toBraille(text))), however an implementation cannot rely on it. Values must be between 0x2800 and 0x28FF.- Parameters:
braille
-- Returns:
- returns a text string
-
getPreferredCharset
java.nio.charset.Charset getPreferredCharset()
Gets the preferred charset for this braille format when reading/writing as text from/to file- Returns:
- returns the preferred charset
-
supportsEightDot
boolean supportsEightDot()
Returns true if 8-dot braille is supported, false otherwise- Returns:
- returns true if 8-dot braille is supported, false otherwise
-
-