How to write/read any type of file using RandomAccessFile that are found in /data/data folder by java

i wamted to read and write a file in /data/data folder without rooting android phones.I saw an app read a file and write in it without my phone is rooted.there is a code that read/write file in /data/data/ folder? And for copyimg from root /data/data/packagename/file to sdcard and vice versa???

I usually use RandomAccessFile to read and write file
I have only a working ome which read/write a file IN SDCARD.So i need or if exists the code to read and write a file in /data/data/packagename/file.i know some of you may found my question silly and disapproved with me but i saw that app do that!btw i have no right to tell app name sorry guys