Patch: file truncation

Michael Koch konqueror@gmx.de
Tue Jul 20 07:44:00 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I just commited the attached patch which is partly a merge from 
classpath (changes done by Mark Wielaared) and some changes in our 
native code. It fixes some mauve testcases. I only changed the native 
code for posix as this is the only I can test.

Mohan: Can you please check the win32 counterpart ?


Michael


2004-07-17  Mark Wielaard  <mark@klomp.org>

	* gnu/java/nio/channels/FileChannelImpl.java (truncate): Only 
truncate
	when size is smaller.
	* java/io/RandomAccessFile.java (setLength): Use truncate for
	shrinking the file and seek plus write for expanding the file.

2004-07-17  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/channels/natFileChannelPosix.cc
	(implTruncate): Always save current position. Only reposition file
	pointer to where we started if not beyond new lenght. Reposition file
	pointer to file length if it points beyond the end of file.
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA+S79WSOgCCdjSDsRAkMwAKCHf8HUwOdqJEx8b8XlowwtTjoyRgCeMHXZ
FcAhzoS7vxSLPc/+Lqv7S0g=
=Ux2A
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: truncate.diff
Type: text/x-diff
Size: 3168 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040720/63de44ef/attachment.bin>


More information about the Java-patches mailing list