update data_ and size_ as public for jni