Author: mturk Date: Tue Apr 14 17:38:00 2009 New Revision: 764894 URL: http://svn.apache.org/viewvc?rev=764894&view=rev Log: Add some javadocs and fix native method visibility
Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java?rev=764894&r1=764893&r2=764894&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java Tue Apr 14 17:38:00 2009 @@ -42,8 +42,8 @@ private static native ByteBuffer attach(long mem, int offset, int size) throws NullPointerException, IllegalArgumentException; - public static native void copy0(ByteBuffer src, int srcPos, ByteBuffer dst, - int dstPos, int count) + private static native void copy0(ByteBuffer src, int srcPos, ByteBuffer dst, + int dstPos, int count) throws NullPointerException, IllegalArgumentException, IndexOutOfBoundsException; @@ -128,6 +128,12 @@ throws NullPointerException, IllegalArgumentException, IndexOutOfBoundsException; + /** + * Copy an ByteBuffer content from specified source ByteBuffer. + * @param src The source ByteBuffer. + * @param dst The destination ByteBuffer. + * @param length The number of bytes to be copied. + */ public static void copy(ByteBuffer src, ByteBuffer dst, int length) throws NullPointerException, IllegalArgumentException, IndexOutOfBoundsException @@ -135,6 +141,14 @@ copy0(src, 0, dst, 0, length); } + /** + * Copy an ByteBuffer content from specified source ByteBuffer. + * @param src The source ByteBuffer. + * @param srcPos Starting position in the source ByteBuffer. + * @param dst The destination ByteBuffer. + * @param dstPos Starting position in the source ByteBuffer. + * @param length The number of bytes to be copied. + */ public static void copy(ByteBuffer src, int srcPos, ByteBuffer dst, int dstPos, int length) throws NullPointerException, IllegalArgumentException,