[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: FileImageOutputStream implemented

Kaffe CVS cvs-commits at kaffe.org
Wed Dec 8 11:41:54 PST 2004


PatchSet 5571 
Date: 2004/12/08 19:37:49
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: FileImageOutputStream implemented
2004-12-08  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/javax/imageio/stream/FileImageOutputStream.java:
        Resynced with GNU Classpath.

        2004-12-07  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/stream/FileImageOutputStream.java:
        Implemented.

Members: 
	ChangeLog:1.3117->1.3118 
	libraries/javalib/javax/imageio/stream/FileImageOutputStream.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3117 kaffe/ChangeLog:1.3118
--- kaffe/ChangeLog:1.3117	Wed Dec  8 19:15:29 2004
+++ kaffe/ChangeLog	Wed Dec  8 19:37:49 2004
@@ -1,5 +1,15 @@
 2004-12-08  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/javax/imageio/stream/FileImageOutputStream.java:
+	Resynced with GNU Classpath.
+	
+	2004-12-07  Michael Koch  <konqueror at gmx.de>
+
+	* javax/imageio/stream/FileImageOutputStream.java:
+	Implemented.
+	
+2004-12-08  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/util/Timer.java:
 	Resynced with GNU Classpath.
 	
Index: kaffe/libraries/javalib/javax/imageio/stream/FileImageOutputStream.java
diff -u kaffe/libraries/javalib/javax/imageio/stream/FileImageOutputStream.java:1.1 kaffe/libraries/javalib/javax/imageio/stream/FileImageOutputStream.java:1.2
--- kaffe/libraries/javalib/javax/imageio/stream/FileImageOutputStream.java:1.1	Sat Oct 23 12:08:19 2004
+++ kaffe/libraries/javalib/javax/imageio/stream/FileImageOutputStream.java	Wed Dec  8 19:37:52 2004
@@ -46,7 +46,7 @@
 /**
  * @author Michael Koch (konqueror at gmx.de)
  */
-public class FileImageOutputStream
+public class FileImageOutputStream extends ImageOutputStreamImpl
 {
   private RandomAccessFile file;
   
@@ -86,5 +86,48 @@
       {
         return -1L;
       }
+  }
+
+  public int read()
+    throws IOException
+  {
+    checkClosed();
+    
+    setBitOffset(0);
+    return file.read();
+  }
+
+  public int read(byte[] data, int offset, int len)
+    throws IOException
+  {
+    checkClosed();
+    
+    setBitOffset(0);
+    return file.read(data, offset, len);
+  }
+
+  public void seek(long position)
+    throws IOException
+  {
+    super.seek(position);
+    file.seek(position);
+  }
+
+  public void write(byte[] data, int offset, int len)
+    throws IOException
+  {
+    checkClosed();
+    
+    flushBits();
+    file.write(data, offset, len);
+  }
+
+  public void write(int value)
+    throws IOException
+  {
+    checkClosed();
+    
+    // FIXME: Flush pending bits.
+    file.write(value);
   }
 }




More information about the kaffe mailing list