[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath

Kaffe CVS cvs-commits at kaffe.org
Thu Jan 8 09:07:02 PST 2004


PatchSet 4294 
Date: 2004/01/08 17:04:18
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath

2004-01-08  Dalibor Topic <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2004-01-08  Michael Koch  <konqueror at gmx.de>

        * gnu/java/nio/PipeImpl.java
        (SourceChannelImpl): New inner class.
        (SinkChannelImpl): New inner class.
        (sink): New member variable.
        (source): New member variable.
        (PipeImpl): Add SelectorProvider argument, implemented.
        (nativeInit): New method.
        (sink): Return sink channel.
        (source): Return source channel.

Members: 
	ChangeLog:1.1881->1.1882 
	libraries/javalib/gnu/java/nio/PipeImpl.java:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1881 kaffe/ChangeLog:1.1882
--- kaffe/ChangeLog:1.1881	Thu Jan  8 16:50:10 2004
+++ kaffe/ChangeLog	Thu Jan  8 17:04:18 2004
@@ -4,6 +4,22 @@
 
 	2004-01-08  Michael Koch  <konqueror at gmx.de>
 
+        * gnu/java/nio/PipeImpl.java
+        (SourceChannelImpl): New inner class.
+        (SinkChannelImpl): New inner class.
+        (sink): New member variable.
+        (source): New member variable.
+        (PipeImpl): Add SelectorProvider argument, implemented.
+        (nativeInit): New method.
+        (sink): Return sink channel.
+        (source): Return source channel.
+
+2004-01-08  Dalibor Topic <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
+	2004-01-08  Michael Koch  <konqueror at gmx.de>
+
         * gnu/java/nio/DatagramChannelImpl.java
         (blocking): Removed.
         (DatagramChannelImpl): Call configureBlocking().
Index: kaffe/libraries/javalib/gnu/java/nio/PipeImpl.java
diff -u kaffe/libraries/javalib/gnu/java/nio/PipeImpl.java:1.2 kaffe/libraries/javalib/gnu/java/nio/PipeImpl.java:1.3
--- kaffe/libraries/javalib/gnu/java/nio/PipeImpl.java:1.2	Sat Oct 25 18:30:21 2003
+++ kaffe/libraries/javalib/gnu/java/nio/PipeImpl.java	Thu Jan  8 17:04:20 2004
@@ -38,24 +38,126 @@
 package gnu.java.nio;
 
 import java.io.IOException;
+import java.nio.ByteBuffer;
 import java.nio.channels.Pipe;
 import java.nio.channels.spi.SelectorProvider;
 
 class PipeImpl extends Pipe
 {
+  public final class SourceChannelImpl extends Pipe.SourceChannel
+  {
+    private int native_fd;
+    
+    public SourceChannelImpl (SelectorProvider selectorProvider,
+                              int native_fd)
+    {
+      super (selectorProvider);
+      this.native_fd = native_fd;
+    }
+
+    protected final void implCloseSelectableChannel()
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    protected void implConfigureBlocking (boolean blocking)
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    public final int read (ByteBuffer src)
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    public final long read (ByteBuffer[] srcs)
+      throws IOException
+    {
+      return read (srcs, 0, srcs.length);
+    }
+
+    public final long read (ByteBuffer[] srcs, int offset, int len)
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    public final int getNativeFD()
+    {
+      return native_fd;
+    }
+  }
+
+  public final class SinkChannelImpl extends Pipe.SinkChannel
+  {
+    private int native_fd;
+    
+    public SinkChannelImpl (SelectorProvider selectorProvider,
+                            int native_fd)
+    {
+      super (selectorProvider);
+      this.native_fd = native_fd;
+    }
+
+    protected final void implCloseSelectableChannel()
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    protected final void implConfigureBlocking (boolean blocking)
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    public final int write (ByteBuffer dst)
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    public final long write (ByteBuffer[] dsts)
+      throws IOException
+    {
+      return write (dsts, 0, dsts.length);
+    }
+
+    public final long write (ByteBuffer[] dsts, int offset, int len)
+      throws IOException
+    {
+      throw new Error ("Not implemented");
+    }
+
+    public final int getNativeFD()
+    {
+      return native_fd;
+    }
+  }
+
+  private SinkChannelImpl sink;
+  private SourceChannelImpl source;
+  
   public PipeImpl (SelectorProvider provider)
     throws IOException
   {
     super();
+    nativeInit (provider);
   }
+
+  private native void nativeInit (SelectorProvider provider)
+    throws IOException;
     
   public Pipe.SinkChannel sink()
   {
-    return null;
+    return sink;
   }
 
   public Pipe.SourceChannel source()
   {
-    return null;
+    return source;
   }
 }




More information about the kaffe mailing list