aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/DirectByteBufferImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/nio/DirectByteBufferImpl.java')
-rw-r--r--libjava/java/nio/DirectByteBufferImpl.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/libjava/java/nio/DirectByteBufferImpl.java b/libjava/java/nio/DirectByteBufferImpl.java
index 7c2b783..be0fc52 100644
--- a/libjava/java/nio/DirectByteBufferImpl.java
+++ b/libjava/java/nio/DirectByteBufferImpl.java
@@ -136,15 +136,20 @@ final class DirectByteBufferImpl extends ByteBuffer
return this;
}
- native void shiftDown (int dst_offset, int src_offset, int count);
+ static native void shiftDown(RawData address, int dst_offset, int src_offset, int count);
+ void shiftDown(int dst_offset, int src_offset, int count)
+ {
+ shiftDown(address, dst_offset, src_offset, count);
+ }
+
public ByteBuffer compact ()
{
int pos = position();
if (pos > 0)
{
int count = remaining();
- shiftDown(0, pos, count);
+ shiftDown(address, 0, pos, count);
position(count);
limit(capacity());
}