trailing zeros in JavaAssets.toByteArray(in)
Double buffer size each time, per ruslan's suggestion.