*  java/nio/DirectByteBufferImpl.java
	(owner): Updated comment.
	(allocate): New method.
From-SVN: r90804
+2004-11-17  Michael Koch  <konqueror@gmx.de>
+
+       *  java/nio/DirectByteBufferImpl.java
+       (owner): Updated comment.
+       (allocate): New method.
+
 2004-11-17  Michael Koch  <konqueror@gmx.de>
 
        * java/net/URL.java (URL): Handle case when argument is null.
 
       }
   }
   
-  /** Used by MappedByteBufferImpl to prevent premature GC. */
+  /** Used by MappedByteBufferImpl and when slicing to prevent premature GC. */
   protected Object owner;
 
   RawData address;
     this.owner = owner;
   }
 
+  /**
+   * Allocates a new direct byte buffer.
+   */ 
+  public static ByteBuffer allocate(int capacity)
+  {
+    return new DirectByteBufferImpl(allocateImpl(capacity), capacity);
+  }
+
   private static native RawData allocateImpl (int capacity);
   private static native void freeImpl (RawData address);