to_javabin: write directly to target, 35% speedup