[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: |
Michael Koch |
Subject: |
Re: [Fwd: FYI: Fix RandomAccessFile.setLenght (truncation file, updates file position).] |
Date: |
Fri, 30 Apr 2004 07:57:15 +0200 |
User-agent: |
KMail/1.5.4 |
Am Donnerstag, 29. April 2004 23:48 schrieb Mark Wielaard:
@@ -209,6 +211,10 @@
public void setLength (long newLen) throws IOException
{
ch.truncate (newLen);
+
+ long position = getFilePointer();
+ if (position > newLen)
+ seek(newLen);
}
/**
Areyou sure the bug isnt in FileChannelImpl.truncate(long) ? have you
checked this ?
Michael