Just do a write first of the bytes, then have a loop that does a write of the StringUtil.SPACE_UTF8. Don't allocate another byte array here.