Package org.daisy.dotify.api.table
Interface BrailleConverter
-
public interface BrailleConverter
Provides an interface for converting from text to braille and vice verca.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 otherwiseString
toBraille(String text)
Transcodes the given text string as braille.String
toText(String braille)
Transcodes the given braille into text.
-
-
-
Method Detail
-
toBraille
String toBraille(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
- the text to convert- Returns:
- returns a Unicode string of braille
-
toText
String toText(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
- the braille to convert- Returns:
- returns a text string
-
getPreferredCharset
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
-
-