I assumed setLength was resizing the underlying buffer. It seems not. So, this will work. I can make this change.