[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath: java/io/RandomAccessFile.java
Kaffe CVS
cvs-commits at kaffe.org
Thu Jun 3 14:50:10 PDT 2004
PatchSet 4818
Date: 2004/06/03 21:38:50
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: java/io/RandomAccessFile.java
2004-06-03 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/io/RandomAccessFile.java:
Resynced with GNU Classpath.
2004-05-28 Michael Koch <konqueror at gmx.de>
* java/io/RandomAccessFile.java
(setLength): Only extend file if new size is bigger.
Members:
ChangeLog:1.2386->1.2387
libraries/javalib/java/io/RandomAccessFile.java:1.25->1.26
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2386 kaffe/ChangeLog:1.2387
--- kaffe/ChangeLog:1.2386 Thu Jun 3 21:07:23 2004
+++ kaffe/ChangeLog Thu Jun 3 21:38:50 2004
@@ -1,5 +1,15 @@
2004-06-03 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/java/io/RandomAccessFile.java:
+ Resynced with GNU Classpath.
+
+ 2004-05-28 Michael Koch <konqueror at gmx.de>
+
+ * java/io/RandomAccessFile.java
+ (setLength): Only extend file if new size is bigger.
+
+2004-06-03 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/gnu/java/security/PolicyFile.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/java/io/RandomAccessFile.java
diff -u kaffe/libraries/javalib/java/io/RandomAccessFile.java:1.25 kaffe/libraries/javalib/java/io/RandomAccessFile.java:1.26
--- kaffe/libraries/javalib/java/io/RandomAccessFile.java:1.25 Tue May 18 03:35:08 2004
+++ kaffe/libraries/javalib/java/io/RandomAccessFile.java Thu Jun 3 21:38:52 2004
@@ -210,11 +210,13 @@
*/
public void setLength (long newLen) throws IOException
{
+ // FIXME: Extending a file should probably be done by one method call.
+
// FileChannel.truncate() can only shrink a file.
// To expand it we need to seek forward and write at least one byte.
if (newLen < length())
ch.truncate (newLen);
- else
+ else if (newLen > length())
{
long pos = getFilePointer();
seek(newLen - 1);
More information about the kaffe
mailing list