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
This commit is contained in:
parent
9114616933
commit
11dde1bb18
9 changed files with 115 additions and 61 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue