Factor out common resizeByteBuffer function from the native versions
Factor out common resizeByteBuffer function from the native versions

ASzc/ceylon-sdk,matejonnet/ceylon-sdk,rohitmohan96/ceylon-sdk,ASzc/ceylon-sdk