BrailleConverter
public class EmbosserBrailleConverter extends java.lang.Object implements BrailleConverter
Modifier and Type | Class | Description |
---|---|---|
static class |
EmbosserBrailleConverter.EightDotFallbackMethod |
Defines the fallback action when a character in the range 0x2840-0x28FF is
encountered.
|
Constructor | Description |
---|---|
EmbosserBrailleConverter(java.lang.String table,
java.nio.charset.Charset charset,
EmbosserBrailleConverter.EightDotFallbackMethod fallback,
char replacement,
boolean ignoreCase) |
Creates a new EmbosserBrailleConverter
|
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 EmbosserBrailleConverter(java.lang.String table, java.nio.charset.Charset charset, EmbosserBrailleConverter.EightDotFallbackMethod fallback, char replacement, boolean ignoreCase)
table
- the characters in the table, in Unicode order. Must contain 64 or 256 characters.charset
- 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 casepublic 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