summaryrefslogtreecommitdiffstats
path: root/libjava/java/nio/MappedByteBufferImpl.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 10:44:18 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 10:44:18 +0000
commit710b1452e5c5244317b9954e90b4c9283106b679 (patch)
tree9b7c7a17527d4c0271c30763af092c759f04c29c /libjava/java/nio/MappedByteBufferImpl.java
parente993f6d9df471c8c746484265657e34767f253e4 (diff)
downloadppe42-gcc-710b1452e5c5244317b9954e90b4c9283106b679.tar.gz
ppe42-gcc-710b1452e5c5244317b9954e90b4c9283106b679.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91146 138bc75d-0d04-0410-961f-82ee72b054a4
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 8f413220a17..c5cf355da4e 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)
OpenPOWER on IntegriCloud