[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Fwd: FYI: Fix RandomAccessFile.setLenght (truncation file, updates
From: |
Jeroen Frijters |
Subject: |
RE: [Fwd: FYI: Fix RandomAccessFile.setLenght (truncation file, updates file position).] |
Date: |
Sun, 2 May 2004 11:23:43 +0200 |
Mark Wielaard wrote:
> In the future we might want an extra native/VM method for expanding
> and/or truncating explicitly.
I think that there should be a native method to set the file size and
then build truncate and RandomAccessFile.setLength on top of that. I
don't think it would be a good idea for RandomAccessFile.setLength to do
a getLength and then call truncate or grow, because that causes a race
condition.
BTW, I'm fine with this patch for 0.09, but post 0.09 it definitely
should be fixed.
Regards,
Jeroen