improve send performance

GetByteArrayElements is not efficient with big-size java byte array.
Merge pull request #312 from liebo/master

improve send performance