@Override protected void doParse(CharSequence contents, StringOption property) { property.reset(); if (contents.length() == 0) { return; } try { append(CharBuffer.wrap(contents), property, encoder, encodeBuffer); } catch (CharacterCodingException e) { throw new IllegalArgumentException(MessageFormat.format( "cannot map input string to UTF-8: {0}", TextUtil.quote(contents)), e); } }
@Override public void addBinary(Binary value) { target.reset(); setBinary(target.get(), value); }
@Override public void addBinary(Binary value) { target.reset(); target.get().set(value.getBytes(), 0, value.length()); }
option.reset();