BrailleConverter
public class AdvancedBrailleConverter extends java.lang.Object implements BrailleConverter
Constructor | Description |
---|---|
AdvancedBrailleConverter(java.lang.String[] table,
java.nio.charset.Charset charset,
boolean ignoreCase,
StringTranslator.MatchMode mode) |
Creates a new 8-dot table.
|
AdvancedBrailleConverter(java.lang.String[] table,
java.nio.charset.Charset charset,
EmbosserBrailleConverter.EightDotFallbackMethod fallback,
char replacement,
boolean ignoreCase,
StringTranslator.MatchMode mode) |
Creates a new 6-dot table.
|
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 file
|
boolean |
supportsEightDot() |
Returns true if 8-dot braille is supported, false otherwise
|
java.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.
|
public AdvancedBrailleConverter(java.lang.String[] table, java.nio.charset.Charset charset, EmbosserBrailleConverter.EightDotFallbackMethod fallback, char replacement, boolean ignoreCase, StringTranslator.MatchMode mode)
table
- the table data, 64 entriescharset
- the preferred charset as defined in the BrailleConverter interfacefallback
- the fallback method to use when encountering a character in the range 0x2840-0x28FFreplacement
- the replacement character, must be in the range 0x2800-0x283FignoreCase
- set to true to ignore character casemode
- the match mode to usepublic AdvancedBrailleConverter(java.lang.String[] table, java.nio.charset.Charset charset, boolean ignoreCase, StringTranslator.MatchMode mode)
table
- the table data, 256 entriescharset
- the preferred charset as defined in the BrailleConverter interfaceignoreCase
- set to true to ignore character casemode
- the match mode to usepublic java.nio.charset.Charset getPreferredCharset()
BrailleConverter
getPreferredCharset
in interface BrailleConverter
public boolean supportsEightDot()
BrailleConverter
supportsEightDot
in interface BrailleConverter
public java.lang.String toBraille(java.lang.String text)
BrailleConverter
toBraille
in interface BrailleConverter
public java.lang.String toText(java.lang.String braille)
BrailleConverter
toText
in interface BrailleConverter