improve send performance

GetByteArrayElements is not efficient with big-size java byte array.