/** * Concatenates 2 SimpleString's * * @param toAdd the SimpleString to concatenate with. * @return the concatenated SimpleString */ public SimpleString concat(final SimpleString toAdd) { byte[] bytes = new byte[data.length + toAdd.getData().length]; System.arraycopy(data, 0, bytes, 0, data.length); System.arraycopy(toAdd.getData(), 0, bytes, data.length, toAdd.getData().length); return new SimpleString(bytes); }