bind/java: ensure there is enough capacity for writing seq

The new testLongString triggers the bug without this change.

Fixes golang/go#9251.

Change-Id: I463e2897b5b08f53801f151c7311d591546c0719
Reviewed-on: https://go-review.googlesource.com/1373
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>