From 86a80fc3522cb14dd0b5a8f4913e8653111bbcc0 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 21 Apr 2004 15:33:53 +0000 Subject: 2004-04-21 Michael Koch * java/nio/DirectByteBufferImpl.java (shiftDown): Made static, give address as argument and provide a convenience method that overwrites shiftDown in ByteBufferImpl and calls the native shiftDown. * java/nio/MappedByteBufferImpl.java (): Use optimized method in DirectByteBufferImpl. * java/nio/natDirectByteBufferImpl.cc (shiftDown): Changed method signature. Removed usage of array_offset. From-SVN: r80967 --- libjava/java/nio/MappedByteBufferImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libjava/java/nio/MappedByteBufferImpl.java') diff --git a/libjava/java/nio/MappedByteBufferImpl.java b/libjava/java/nio/MappedByteBufferImpl.java index ccd987e..5932c99 100644 --- a/libjava/java/nio/MappedByteBufferImpl.java +++ b/libjava/java/nio/MappedByteBufferImpl.java @@ -121,7 +121,8 @@ final class MappedByteBufferImpl extends MappedByteBuffer if (pos > 0) { int count = remaining(); - shiftDown(0, pos, count); + // Call shiftDown method optimized for direct buffers. + DirectByteBufferImpl.shiftDown(address, 0, pos, count); position(count); limit(capacity()); } -- cgit v1.1