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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -