/** {@inheritDoc} */ public int fromHost(final ICobolDbcsBinding ce, final byte[] hostSource, final int offset) throws HostException { int newOffset = offset; try { String javaString = fromHostSingle( getCobolContext().getHostCharsetName(), ce.getByteLength(), hostSource, newOffset); ce.setStringValue(javaString); newOffset += ce.getByteLength(); } catch (CobolConversionException e) { throwHostException(ce, e); } return newOffset; }
/** {@inheritDoc} */ public int toHost(final ICobolDbcsBinding ce, final byte[] hostTarget, final int offset) throws HostException { int newOffset = 0; try { newOffset = toHostSingle( ce.getStringValue(), getCobolContext().getHostCharsetName(), ce.getByteLength(), ce.isJustifiedRight(), hostTarget, offset); } catch (CobolConversionException e) { throwHostException(ce, e); } return newOffset; }