aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/MappedByteBufferImpl.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-11-24 10:44:18 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-11-24 10:44:18 +0000
commit11dde1bb18eaf7a6981bc5e7e46cc7d945d55182 (patch)
tree9b7c7a17527d4c0271c30763af092c759f04c29c /libjava/java/nio/MappedByteBufferImpl.java
parent911461693337552b76b5994d9d875e1b78e64b28 (diff)
downloadgcc-11dde1bb18eaf7a6981bc5e7e46cc7d945d55182.zip
gcc-11dde1bb18eaf7a6981bc5e7e46cc7d945d55182.tar.gz
gcc-11dde1bb18eaf7a6981bc5e7e46cc7d945d55182.tar.bz2
NIOServerSocket.java: Added email to @author tag.
2004-11-24 Michael Koch <konqueror@gmx.de> * gnu/java/nio/NIOServerSocket.java: Added email to @author tag. * java/nio/DirectByteBufferImpl.java: Moved native methods to java.nio.VMDirectByteBuffer class. * java/nio/MappedByteBufferImpl.java: Use native methods from java.nio.VMDirectByteBuffer class. * java/nio/VMDirectByteBuffer.java: New file, * java/nio/natDirectByteBufferImpl.cc: Moved all methods into java.nio.VMDirectByteBuffer class. * java/nio/channels/spi/AbstractSelectableChannel.java (register): Only re-use valid keys. * Makefile.am: Added java/nio/VMDirectByteBuffer.java. * Makefile.in: Regenerated. From-SVN: r91146
Diffstat (limited to 'libjava/java/nio/MappedByteBufferImpl.java')
-rw-r--r--libjava/java/nio/MappedByteBufferImpl.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/libjava/java/nio/MappedByteBufferImpl.java b/libjava/java/nio/MappedByteBufferImpl.java
index 8f41322..c5cf355 100644
--- a/libjava/java/nio/MappedByteBufferImpl.java
+++ b/libjava/java/nio/MappedByteBufferImpl.java
@@ -72,8 +72,8 @@ final class MappedByteBufferImpl extends MappedByteBuffer
checkForUnderflow();
int pos = position();
- byte result = DirectByteBufferImpl.getImpl(address, pos);
- position (pos + 1);
+ byte result = VMDirectByteBuffer.get(address, pos);
+ position(pos + 1);
return result;
}
@@ -83,7 +83,7 @@ final class MappedByteBufferImpl extends MappedByteBuffer
checkForOverflow();
int pos = position();
- DirectByteBufferImpl.putImpl(address, pos, value);
+ VMDirectByteBuffer.put(address, pos, value);
position(pos + 1);
return this;
}
@@ -92,7 +92,7 @@ final class MappedByteBufferImpl extends MappedByteBuffer
{
checkIndex(index);
- return DirectByteBufferImpl.getImpl(address, index);
+ return VMDirectByteBuffer.get(address, index);
}
public ByteBuffer get(byte[] dst, int offset, int length)
@@ -101,7 +101,7 @@ final class MappedByteBufferImpl extends MappedByteBuffer
checkForUnderflow(length);
int index = position();
- DirectByteBufferImpl.getImpl(address, index, dst, offset, length);
+ VMDirectByteBuffer.get(address, index, dst, offset, length);
position(index+length);
return this;
@@ -112,7 +112,7 @@ final class MappedByteBufferImpl extends MappedByteBuffer
checkIfReadOnly();
checkIndex(index);
- DirectByteBufferImpl.putImpl(address, index, value);
+ VMDirectByteBuffer.put(address, index, value);
return this;
}
@@ -123,7 +123,7 @@ final class MappedByteBufferImpl extends MappedByteBuffer
{
int count = remaining();
// Call shiftDown method optimized for direct buffers.
- DirectByteBufferImpl.shiftDown(address, 0, pos, count);
+ VMDirectByteBuffer.shiftDown(address, 0, pos, count);
position(count);
limit(capacity());
}
@@ -138,10 +138,9 @@ final class MappedByteBufferImpl extends MappedByteBuffer
public ByteBuffer slice()
{
int rem = remaining();
- return new DirectByteBufferImpl (this,
- DirectByteBufferImpl
- .adjustAddress(address, position()),
- rem, rem, 0, isReadOnly ());
+ return new DirectByteBufferImpl
+ (this, VMDirectByteBuffer.adjustAddress(address, position()),
+ rem, rem, 0, isReadOnly());
}
private ByteBuffer duplicate(boolean readOnly)