android - How to create a file of specific size on sd card programatically -


can 1 please let me know how create file of specific size on sd card programatically. did tried shell command of no use,

try {    process p = runtime.getruntime().exec("dd of=/mnt/extsdcard/output.dat bs=1 seek=1m count=0"); } catch (ioexception e1) {  } 

i did try same command in shell script , not able create file. guess since device not rooted, command did not work.

any regarding highly appreciated.

-regards, manju

you can use randomaccessfile shown here.


Comments

Popular posts from this blog

html - Cut text on left side inside button while centering -

plugins - CodeIgniter support on netbeans 8.0 -

php - Selecting items from MySQL for a status update feed efficiently while accounting for possible spam -