org.liblouis.TranslationResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liblouis-java Show documentation
Show all versions of liblouis-java Show documentation
JNA based Java bindings to liblouis, an open-source braille translator and back-translator.
package org.liblouis;
import com.sun.jna.ptr.IntByReference;
public class TranslationResult {
private String braille = null;
private byte[] hyphenPositions = null;
public TranslationResult(
WideString outbuf,
IntByReference outlen,
byte[] outputHyphens) {
this.braille = outbuf.read(outlen.getValue());
if (outputHyphens != null) {
this.hyphenPositions = new byte[outlen.getValue()-1];
for (int i=0; i