preallocate files
Author |
Message |
matt271
|
Posted: Tue May 05, 2009 12:55 pm Post subject: preallocate files |
|
|
in java is it possible to preallocate files?
say i wanna create a file 100mb. so i create the file then "size" it to 100mb. now i can seek to anywhere in the file and write to it.
the only way i can think of to do it, is to write 100mb of garbage and then start witting over top of that. but i dont like this because it has to physically write 100mb to the hard disk.
so if there anyway java can create a 100mb file w/out witting to it? im sure the file system has a way to do it. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Vermette
|
|
|
|
|
|
|