aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio
AgeCommit message (Collapse)AuthorFilesLines
2004-09-21ByteBuffer.java (hashCode): Implemented.Sven de Marothy7-14/+124
2004-09-21 Sven de Marothy <sven@physto.se> * java/nio/ByteBuffer.java (hashCode): Implemented. * java/nio/CharBuffer.java: Likewise. * java/nio/DoubleBuffer.java: Likewise. * java/nio/FloatBuffer.java: Likewise. * java/nio/LongBuffer.java: Likewise. * java/nio/IntBuffer.java: Likewise. * java/nio/ShortBuffer.java: Likewise. From-SVN: r87804
2004-08-30[multiple changes]Andreas Tobler7-7/+7
2004-08-30 Tom Tromey <tromey@redhat.com> * java/nio/CharBuffer.java (put): Fix typo. * java/nio/DoubleBuffer.java (put): Fix typo. * java/nio/FloatBuffer.java (put): Fix typo. * java/nio/IntBuffer.java (put): Fix typo. * java/nio/LongBuffer.java (put): Fix typo. * java/nio/ShortBuffer.java (put): Fix typo. 2004-08-30 Florian Weimer <fw@deneb.enyo.de> * java/nio/ByteBuffer.java (put): Fix typo. From-SVN: r86758
2004-07-172004-07-17 Michael Koch <konqueror@gmx.de>Michael Koch2-12/+4
* java/nio/ByteOrder.java (static): Removed. Not needed. Thanks to Patrick Reali for noticing. * java/nio/charset/CharsetDecoder.java (decode): Fix for classpath bug #9177: Reset state before flipping. From-SVN: r84856
2004-07-09Buffer.java, [...]: Fixed javadocs all over.Dalibor Topic24-278/+519
2004-07-09 Dalibor Topic <robilad@kaffe.org> * java/nio/Buffer.java, java/nio/ByteBuffer.java, java/nio/ByteBufferHelper.java, java/nio/ByteBufferImpl.java, java/nio/CharBuffer.java, java/nio/CharBufferImpl.java, java/nio/CharViewBufferImpl.java, java/nio/DirectByteBufferImpl.java, java/nio/DoubleBuffer.java, java/nio/DoubleBufferImpl.java, java/nio/DoubleViewBufferImpl.java, java/nio/FloatBuffer.java, java/nio/FloatBufferImpl.java, java/nio/FloatViewBufferImpl.java, java/nio/IntBuffer.java, java/nio/IntBufferImpl.java, java/nio/IntViewBufferImpl.java, java/nio/LongBuffer.java, java/nio/LongBufferImpl.java, java/nio/LongViewBufferImpl.java, java/nio/MappedByteBufferImpl.java, java/nio/ShortBuffer.java, java/nio/ShortBufferImpl.java, java/nio/ShortViewBufferImpl.java: Fixed javadocs all over. Improved input error checking. * java/nio/Buffer.java (checkForUnderflow, checkForOverflow, checkIndex, checkIfReadOnly, checkArraySize): New helper methods for error checking. * java/nio/ByteBufferHelper.java (checkRemainingForRead, checkRemainingForWrite, checkAvailableForRead, checkAvailableForWrite): Removed no longer needed methods. From-SVN: r84366
2004-05-302004-05-30 Michael Koch <konqueror@gmx.de>Michael Koch2-20/+39
* java/nio/Buffer.java (limit): Fixed off by one error. * java/nio/CharBuffer.java (wrap): Fixed arguments, added javadocs. From-SVN: r82448
2004-05-042004-05-04 Michael Koch <konqueror@gmx.de>Michael Koch7-167/+132
* java/nio/ByteBuffer.java, java/nio/CharBuffer.java, java/nio/DoubleBuffer.java, java/nio/FloatBuffer.java, java/nio/IntBuffer.java, java/nio/LongBuffer.java, java/nio/ShortBuffer.java: (compareTo): Fixed bogus implementation in all buffer classes. From-SVN: r81489
2004-04-222004-04-22 Michael Koch <konqueror@gmx.de>Michael Koch2-2/+12
* java/nio/charset/IllegalCharsetNameException.java (charsetName): Made private. (IllegalCharsetNameException): Added @param tag to javadoc. (getCharsetName): Added @return tag to javadoc. * java/nio/charset/MalformedInputException.java (MalformedInputException): Added @param tag to javadoc. (getInputLength): Revised method description, added @return tag. (getMessage): Added @return tag. From-SVN: r81003
2004-04-212004-04-21 Michael Koch <konqueror@gmx.de>Michael Koch3-6/+12
* 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
2004-04-20Channels.java: Merged coding style with GNU classpath.Michael Koch1-2/+2
2004-04-20 Michael Koch <konqueror@gmx.de> * java/nio/channels/Channels.java: Merged coding style with GNU classpath. From-SVN: r80923
2004-04-20Buffer.java, [...]: Fixed javadocs and jalopied all over java.nio.Michael Koch42-458/+610
2004-04-20 Michael Koch <konqueror@gmx.de> * java/nio/Buffer.java, java/nio/channels/AlreadyConnectedException.java, java/nio/channels/AsynchronousCloseException.java, java/nio/channels/ByteChannel.java, java/nio/channels/CancelledKeyException.java, java/nio/channels/Channel.java, java/nio/channels/Channels.java, java/nio/channels/ClosedByInterruptException.java, java/nio/channels/ClosedChannelException.java, java/nio/channels/ClosedSelectorException.java, java/nio/channels/ConnectionPendingException.java, java/nio/channels/DatagramChannel.java, java/nio/channels/FileChannel.java, java/nio/channels/FileLock.java, java/nio/channels/FileLockInterruptionException.java, java/nio/channels/GatheringByteChannel.java, java/nio/channels/IllegalBlockingModeException.java, java/nio/channels/IllegalSelectorException.java, java/nio/channels/InterruptibleChannel.java, java/nio/channels/NoConnectionPendingException.java, java/nio/channels/NonReadableChannelException.java, java/nio/channels/NonWritableChannelException.java, java/nio/channels/NotYetBoundException.java, java/nio/channels/NotYetConnectedException.java, java/nio/channels/OverlappingFileLockException.java, java/nio/channels/Pipe.java, java/nio/channels/ReadableByteChannel.java, java/nio/channels/ScatteringByteChannel.java, java/nio/channels/SelectableChannel.java, java/nio/channels/SelectionKey.java, java/nio/channels/Selector.java, java/nio/channels/ServerSocketChannel.java, java/nio/channels/SocketChannel.java, java/nio/channels/UnresolvedAddressException.java, java/nio/channels/UnsupportedAddressTypeException.java, java/nio/channels/WritableByteChannel.java, java/nio/channels/spi/AbstractInterruptibleChannel.java, java/nio/channels/spi/AbstractSelectableChannel.java, java/nio/channels/spi/AbstractSelectionKey.java, java/nio/channels/spi/AbstractSelector.java, java/nio/channels/spi/SelectorProvider.java, java/nio/charset/spi/CharsetProvider.java: Fixed javadocs and jalopied all over java.nio. From-SVN: r80909
2004-04-20ByteBufferImpl.java, [...]: Made sure all classes are final and removed ↵Michael Koch14-115/+114
final keyword from all methods. 2004-04-20 Michael Koch <konqueror@gmx.de> * java/nio/ByteBufferImpl.java, java/nio/CharBufferImpl.java, java/nio/DirectByteBufferImpl.java, java/nio/DoubleBufferImpl.java, java/nio/DoubleViewBufferImpl.java, java/nio/FloatBufferImpl.java, java/nio/FloatViewBufferImpl.java, java/nio/IntBufferImpl.java, java/nio/IntViewBufferImpl.java, java/nio/LongBufferImpl.java, java/nio/LongViewBufferImpl.java, java/nio/MappedByteBufferImpl.java, java/nio/ShortBufferImpl.java, java/nio/ShortViewBufferImpl.java: Made sure all classes are final and removed final keyword from all methods. From-SVN: r80907
2004-03-182004-03-18 Michael Koch <konqueror@gmx.de>Michael Koch3-17/+28
* java/nio/channels/spi/AbstractSelectableChannel.java (keys): Initialize at declaration. (locate): keys cant be null. (add): Removed. (addSelectionKey): New method. (removeSelectionKey): New method. * java/nio/channels/spi/AbstractSelectionKey.java (cancel): Call AbstractSelector.cancelKey(SelectionKey key). * java/nio/channels/spi/AbstractSelector.java (provider): Javadoc added. (cancelledKeys): Javadoc added. (cancelKey): Javadoc added, add key to cancelledKeys. (deregister): Implemented. From-SVN: r79640
2004-03-03Channels.java (newInputStream, [...]): Optimize when argument is a ↵Per Bothner2-2/+48
FileChannelImpl. * java/nio/channels/Channels.java (newInputStream, newOutputStream): Optimize when argument is a FileChannelImpl. (newInputStream(FileChannelImpl), newOutputStream(FileChannelImpl)): New native methods. * java/nio/channels/natChannels.cc: New file for new native methods. * Makefile.am: Update accordingly. From-SVN: r78867
2004-02-29MappedByteBuffer.java: (forceImpl...Per Bothner2-47/+103
* java/nio/MappedByteBuffer.java: (forceImpl, isLoadedImpl, loadImpl, unmapImpl): New dummy methods, to be overridden by subclass. (finalize, isLoaded, load, force): New methods. * java/nio/MappedByteBufferImpl.java: More-or-less rewrite. Now works, at least for read mapping. From-SVN: r78662
2004-02-29FileChannelImpl.java: Moved to package gnu/java/nio/channels, since we need ↵Per Bothner2-551/+0
to refer to it from java.io. * java/nio/channels/FileChannelImpl.java: Moved to package gnu/java/nio/channels, since we need to refer to it from java.io. * java/nio/channels/natFileChannelImpl.cc: Removed file. * Makefile.am, configure.in: Updated accordingly. From-SVN: r78660
2004-02-282004-02-28 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+1
* java/nio/ByteOrder.java (nativeOrder): Use equals() to compare strings. From-SVN: r78626
2004-02-262004-02-26 Michael Koch <konqueror@gmx.de>Michael Koch3-11/+13
* gnu/java/nio/FileLockImpl.java (finalize): Made protected. * java/nio/channels/FileChannel.java (MapMode.READ_ONLY): Made final. (MapMode.READ_WRITE): Made final. (MapMode.PRIVATE): Made final. * java/nio/channels/SocketChannel.java (open): Simplified code. * java/nio/channels/spi/AbstractSelectableChannel.java (registered): Unused, removed. (keyFor): Check channel is open, only locate key and not add a new one. (register): Don't delete attachments. From-SVN: r78519
2004-02-16ByteBuffer.java (endian): Make non-private so other java.nio classes can ↵Per Bothner5-96/+159
inherit it. * java/nio/ByteBuffer.java (endian): Make non-private so other java.nio classes can inherit it. (<init>): Don't bother clearing array_offset. * java/nio/ByteBuffer.java (allocate): Re-implement using wrap. * java/nio/ByteBuffer.java (get(byte[],int,int)): Check underflow. Remove redundant test. * java/nio/ByteBufferImpl.java (asCharBuffer, asShortBuffer, asIntBuffer, asLongBuffer, asFloatBuffer, asDoubleBuffer): Use new XxxViewBufferImpl constructors. * java/nio/MappedByteBufferImpl.java: Likewise. * java/nio/DirectByteBufferImpl.java: Likewise. * java/nio/ByteBufferImpl.java: Remove one constructor. Inline super in remaining constructor. * java/nio/ByteBuffer.java: Remove unused constructor. * java/nio/ByteBufferImpl.java (shiftDown): New optimized method. * java/nio/ByteBufferImpl.java (get, put): Add array_offset. * java/nio/DirectByteBufferImpl.java (owner): New field. (offset): Remove unused field. (<init>): Modify one and add another constructor. Change callers. (allocateDirect): Removed - not used. (getImpl, putImpl): Make static and pass address explicitly, to make them useful for MappedByteBufferImpl. (get, put): Check for underflow. Modify for new getImpl. (getImpl): New native method where target is array. (get(byte[],int,int)): Use the above. (adjustAddress): New static native method. (slice, duplicate, asReadOnly): New implementations. * java/nio/natDirectByteBufferImpl.cc (getImpl, putImpl, shiftDown, adjustAddress): New or updated native methods. From-SVN: r77919
2004-02-16CharViewBufferImpl.java: New convenience constructor.Per Bothner6-6/+60
* java/nio/CharViewBufferImpl.java: New convenience constructor. Fix buggy call to super constructor. * java/nio/DoubleViewBufferImpl.java: Likewise. * java/nio/FloatViewBufferImpl.java: Likewise. * java/nio/IntViewBufferImpl.java: Likewise. * java/nio/LongViewBufferImpl.java: Likewise. * java/nio/ShortViewBufferImpl.java: Likewise. From-SVN: r77917
2004-02-16CharBufferImpl.java: Inline super constructor.Per Bothner12-48/+18
* java/nio/CharBufferImpl.java: Inline super constructor. * java/nio/DoubleBufferImpl.java: Likewise. * java/nio/FloatBufferImpl.java: Likewise. * java/nio/IntBufferImpl.java: Likewise. * java/nio/LongBufferImpl.java: Likewise. * java/nio/ShortBufferImpl.java: Likewise. * java/nio/CharBuffer.java: Remove unused constructor. * java/nio/DoubleBuffer.java: Likewise. * java/nio/FloatBuffer.java: Likewise. * java/nio/IntBuffer.java: Likewise. * java/nio/LongBuffer.java: Likewise. * java/nio/ShortBuffer.java: Likewise. From-SVN: r77916
2004-02-14AbstractInterruptibleChannel.java (close): Set closed before calling ↵Per Bothner1-1/+1
implCloseChannel, as in the spec. * java/nio/channels/spi/AbstractInterruptibleChannel.java (close): Set closed before calling implCloseChannel, as in the spec. From-SVN: r77809
2004-02-08ByteBuffer.java (shiftDown): New helper method.Per Bothner12-548/+461
* java/nio/ByteBuffer.java (shiftDown): New helper method. * java/nio/natDirectByteBufferImpl.cc (shiftDown): New implementation. * java/nio/ByteBufferImpl.java (compact): Use new shiftDown method. * sava/nio/ByteBufferHelper.java: Remove redundant 'final' specifiers. Pass ByteOrder parameter to most methods, since the underlying ByteBuffer's order isn't always what we should use. * java/nio/ByteBufferImpl.java: Pass byte-order various places. * java/nio/DirectByteBufferImpl.java: Likewise. Use ByteBufferHelper methods. * java/nio/MappedByteBufferImpl.java: Likewise. (compact): Use shiftDown. * java/nio/CharViewBufferImpl.java (<init>): Pass byte-order. (get, put): Use ByteBufferHelper. (compact): Use new shiftDown method. (duplicate(boolean)): New helper method. (duplicate, asReadOnlyBuffer): Use it. (order): Return endian field. * java/nio/DoubleViewBufferImpl.java: Likewise. * java/nio/FloatViewBufferImpl.java: Likewise. * java/nio/IntViewBufferImpl.java: Likewise. * java/nio/LongViewBufferImpl.java: Likewise. * java/nio/ShortViewBufferImpl.java: Likewise. * java/nio/CharViewBufferImpl.java (subsequence): Redundant test. * java/nio/DirectByteBufferImpl.java (shiftDown): New native method. (compact): Re-implement using shiftDown. From-SVN: r77501
2004-01-30* gnu/java/net/PlainSocketImpl.javaMohan Embar1-3/+6
(inChannelOperation): New field. (isInChannelOperation): New accessor. (setInChannelOperation): New modifier. * gnu/java/nio/ServerSocketChannelImpl.java (accept): Set and reset our server socket's PlainSocketImpl's "in channel operation" indicator before and after delegating the accept to our server socket. * gnu/java/nio/SocketChannelImpl.java (connect): Set and reset our socket's PlainSocketImpl's "in channel operation" indicator before and after delegating the operation to our socket. (read): Likewise. (write): Likewise. * java/net/ServerSocket.java (implAccept): Don't throw an IllegalBlockingModeException if we have a non-blocking channel which initiated this accept operation. * java/net/Socket.java (connect): Don't throw an IllegalBlockingModeException if we have a non-blocking channel which initiated this connect operation. * java/nio/channels/spi/AbstractSelectableChannel.java (configureBlocking): Only call implConfigureBlocking() if the desired blocking mode is different from our current one. From-SVN: r76956
2004-01-23FileLockImpl.java: Fixed filename in copyright.Michael Koch2-4/+53
2004-01-23 Michael Koch <konqueror@gmx.de> * gnu/java/nio/FileLockImpl.java: Fixed filename in copyright. (released): Removed. (finalize): New method. * gnu/java/nio/natFileLockImpl.cc (releaseImpl): Implemented. * java/nio/channels/FileChannelImpl.java: Reworked imports. (lock): Implemented. (lockImpl): New method. (tryLock): Implemented. (tryLockImpl): New method. * java/nio/channels/natFileChannelImpl.cc (lockImpl): New method. (tryLockImpl): New method. From-SVN: r76422
2004-01-072004-01-07 Michael Koch <konqueror@gmx.de>Michael Koch1-5/+5
* gnu/java/nio/DatagramChannelImpl.java (blocking): Removed. (DatagramChannelImpl): Call configureBlocking(). (implConfigureBlocking): Dont initialize blocking. * gnu/java/nio/ServerSocketChannelImpl.java (blocking): Removed. (ServerSocketChannelImpl): Call configureBlocking(). (implConfigureBlocking): Dont initialize blocking. * gnu/java/nio/SocketChannelImpl.java (blocking): Removed. (SocketChannelImpl): Call configureBlocking(). (implConfigureBlocking): Dont initialize blocking. (connect): Use isBlocking(). * java/nio/channels/spi/AbstractSelectableChannel.java (configureBlocking): Use blockingLock() instead of LOCK. Set blocking after successfully called implConfigureBlocking(). (register): Use blockingLock() instead of LOCK. From-SVN: r75507
2003-12-20* gnu/java/nio/SelectorImpl.javaMohan Embar1-2/+9
(selectThreadMutex): New field. (selectThread): New field. (unhandledWakeup): New field. (implCloseSelector): Added skeleton code which synchronizes as per Sun JRE JavaDoc. (keys): Throw ClosedSelectorException if selector is closed. (selectNow): Added comment that we're faking out an immediate select with a one-microsecond-timeout one. (select): Use 0 instead of -1 for infinite timeout. (implSelect): Changed comment in declaration. (select): Added synchronized to method declaration. Added synchronization and wakeup support as per Sun JRE JavaDoc. (selectedKeys): Throw ClosedSelectorException if selector is closed. (wakeup): Implemented. (deregisterCancelledKeys): Synchronize on cancelled key set before deregistering. (register): Synchronize on key set before registering. * java/nio/channels/spi/AbstractSelector.java Added import for java.nio.channels.ClosedSelectorException. (close): Added synchronized to method declaration. (cancelledKeys): Throw ClosedSelectorException if selector is closed. (cancelKey): Synchronize on cancelled key set before key. From-SVN: r74879
2003-12-19ChannelOutputStream.java: New file.Michael Koch1-2/+3
2003-12-19 Michael Koch <konqueror@gmx.de> * gnu/java/nio/ChannelOutputStream.java: New file. * java/nio/channels/Channels.java (newOutputStream): Implemented. * Makefile.am (ordinary_java_source_files) Added gnu/java/nio/ChannelOutputStream.java. * Makefile.in: Regenerated. From-SVN: r74847
2003-12-19ChannelInputStream.java: New file.Michael Koch2-3/+6
2003-12-19 Michael Koch <konqueror@gmx.de> * gnu/java/nio/ChannelInputStream.java: New file. * java/nio/channels/Channels.java (newInputStream): Implemented. * java/nio/channels/FileChannelImpl.java (readImpl): Only put data into buffer if something was read. * Makefile.am (ordinary_java_source_files): Added gnu/java/nio/ChannelInputStream.java. * Makefile.in: Regenerated. From-SVN: r74842
2003-12-19OutputStreamChannel.java: New file.Michael Koch1-2/+3
2003-12-19 Michael Koch <konqueror@gmx.de> * gnu/java/nio/OutputStreamChannel.java: New file. * java/nio/channels/Channels.java (newChannel): Implemented. * Makefile.am (ordinary_java_source_files): Added gnu/java/nio/OutputStreamChannel.java. * Makefile.in: Regenerated. From-SVN: r74840
2003-12-19InputStreamChannel.java: New file.Michael Koch1-3/+4
2003-12-19 Michael Koch <konqueror@gmx.de> * gnu/java/nio/InputStreamChannel.java: New file. * java/nio/channels/Channels.java (newChannel): Implemented. From-SVN: r74838
2003-12-022003-12-02 Michael Koch <konqueror@gmx.de>Michael Koch1-4/+7
* java/nio/channels/spi/AbstractInterruptibleChannel.java (opened): Removed. (closed): New field. (close): Check of channel is closed already. (isOpen): Return !closed. From-SVN: r74182
2003-11-112003-11-11 Michael Koch <konqueror@gmx.de>Michael Koch1-2/+1
* java/nio/ByteBuffer.java (equals): Remove redundant obj == null check. From-SVN: r73447
2003-10-21ByteOrder.java, [...]: Add code to load library with code for native methods ↵Michael Koch3-0/+31
if needed. 2003-10-21 Michael Koch <konqueror@gmx.de> * java/nio/ByteOrder.java, java/nio/DirectByteBufferImpl.java, java/nio/channels/FileChannelImpl.java: Add code to load library with code for native methods if needed. From-SVN: r72747
2003-10-132003-10-13 Michael Koch <konqueror@gmx.de>Michael Koch2-3/+8
* java/nio/Buffer.java (hasRemaining): Made implementation more clear. * java/nio/MappedByteBuffer.java (loaded): New member variable. (force): Added comment. (isLoaded): Return value of loaded. (load): Set loaded to true, added comment. From-SVN: r72418
2003-10-122003-10-12 Michael Koch <konqueror@gmx.de>Michael Koch1-6/+25
* gnu/java/nio/PipeImpl.java (SourceChannelImpl): New inner class. (SinkChannelImpl): New inner class. (sink): New member variable. (source): New member variable. (PipeImpl): Add SelectorProvider argument, implemented. (nativeInit): New method. (sink): Return sink channel. (source): Return source channel. * gnu/java/nio/SelectorProviderImpl.java (openPipe): Give provider as argument to PipeImpl constructor. * java/nio/channels/spi/SelectorProvider.java (pr): Removed. (systemDefaultProvider): New member variable. (provider): Made it synchronized, use property java.nio.channels.spi.SelectorProvider. * gnu/java/nio/natPipeImpl.cc: New file. * Makefile.am (nat_source_files): Added gnu/java/nio/natPipeImpl.cc. * Makefile.in: Regenerated. From-SVN: r72397
2003-10-11Channel.java, [...]: Removed redundant modifiers.Michael Koch5-8/+8
2003-10-11 Michael Koch <konqueror@gmx.de> * java/nio/channels/Channel.java, java/nio/channels/GatheringByteChannel.java, java/nio/channels/ReadableByteChannel.java, java/nio/channels/ScatteringByteChannel.java, java/nio/channels/WritableByteChannel.java: Removed redundant modifiers. From-SVN: r72355
2003-10-092003-10-09 Michael Koch <konqueror@gmx.de>Michael Koch3-49/+56
* java/nio/channels/spi/AbstractSelectableChannel.java (registered): Made private. (blocking): Likewise. (LOCK): Likewise. (provider): Likewise. (keys): Made it a private LinkedList. (AbstractSelectableChannel): Initialize keys. (isRegistered): New implementation. (locate): Rewritten. (register): Rewritten. * java/nio/channels/spi/AbstractSelectionKey.java (ok): Removed. (cancelled): New member variable. (cancel): Rewritten. (isValid): Rewritten. * java/nio/channels/spi/AbstractSelector.java: Some methods moved. (closed): Make private. (provider): Likewise. (cancelledKeys): New member variable. (AbstractSelector): Initialize cancelledKeys. (cancelKey): New method. From-SVN: r72275
2003-10-02ByteBufferHelper.java: Rewrote all methods by suggestions from Eric Blake.Michael Koch1-156/+112
2003-10-02 Michael Koch <konqueror@gmx.de> * java/nio/ByteBufferHelper.java: Rewrote all methods by suggestions from Eric Blake. From-SVN: r72030
2003-09-26ByteBufferHelper.java: Totally reworked with help from Eric Blake.Michael Koch1-229/+77
2003-09-26 Michael Koch <konqueror@gmx.de> * java/nio/ByteBufferHelper.java: Totally reworked with help from Eric Blake. From-SVN: r71823
2003-09-25ByteBufferHelper.java: New file.Michael Koch4-395/+699
2003-09-25 Michael Koch <konqueror@gmx.de> * java/nio/ByteBufferHelper.java: New file. * java/nio/ByteBufferImpl.java, java/nio/DirectByteBufferImpl.java, java/nio/MappedByteBufferImpl.java (getType,putType): Use new helper class ByteBufferHelper. * Makefile.am (ordinary_java_source_files): Added java/nio/ByteBufferHelper.java. * Makefile.in: Regenerated. From-SVN: r71757
2003-08-022003-08-02 Michael Koch <konqueror@gmx.de>Michael Koch4-138/+251
* java/nio/ByteBufferImpl.java (getChar): Check remaining bytes, fixed comment about endianess. (putChar): Likewise. (getShort): Likewise. (putShort): Likewise. (getInt): Check remaining bytes, fixed conversion, fixed comment about endianess. (putInt): Likewise. (getLong): Likewise. (putLong): Likewise. (getFloat): Likewise. (putFloat): Likewise. (getDouble): Likewise. (putDouble): Likewise. * java/nio/DirectByteBufferImpl.java (getChar): Wrapped code, fixed comment about endianess. (putchar): Likewise. (getShort): Likewise. (putShort): Likewise. (getInt): Fixed conversion, fixed comment about endianess. (putInt): Likewise. (getLong): Likewise. (putLong): Likewise. (getFloat): Likewise. (putFloat): Likewise. (getDouble): Likewise. (putDouble): Likewise. * java/nio/MappedByteBufferImpl.java (compact): Implemented. (getChar): Implemented. (putChar): Implemented. (getDouble): Implemented. (putdouble): Implemented. (getFloat): Implemented. (putFloat): Implemented. (getInt): Implemented. (putInt): Implemented. (getLong): Implemented. (putLong): Implemented. (getShort): Implemented. (putShort): Implemented. * java/nio/channels/FileChannelImpl.java (read): Set position where to access file. (write): Likewise. (transferTo): Flip buffer after read and before write. (transferFrom): Likewise. From-SVN: r70102
2003-07-13FileChannelImpl.java, [...]: Removed.Michael Koch3-1/+487
2003-07-13 Michael Koch <konqueror@gmx.de> * gnu/java/nio/FileChannelImpl.java, gnu/java/nio/natFileChannelImpl.cc: Removed. * java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/RandomAccessFile.java, java/nio/MappedByteBufferImpl.java: Import java.nio.channels.FileChannelImpl instead of gnu.java.nio.FileChannelImpl. * java/nio/channels/FileChannelImpl.java, java/nio/channels/natFileChannelImpl.cc: New files. * Makefile.am (ordinary_java_source_files): Removed gnu/java/nio/FileChannelImpl.java and added java/nio/channels/FileChannelImpl.java. (nat source_files): Removed gnu/java/nio/natFileChannelImpl.cc and added java/nio/channels/natFileChannelImpl.cc. * Makefile.in: Regenerated. From-SVN: r69296
2003-06-272003-06-27 Michael Koch <konqueror@gmx.de>Michael Koch10-10/+10
* java/nio/ByteBufferImpl.java (ByteBufferImpl): Made it a package-private class * java/nio/CharBufferImpl.java (CharBufferImpl): Made it a package-private class * java/nio/DirectByteBufferImpl.java (DirectByteBufferImpl): Made it a package-private class * java/nio/DoubleBufferImpl.java (DoubleBufferImpl): Made it a package-private class * java/nio/FloatBufferImpl.java (FloatBufferImpl): Made it a package-private class * java/nio/IntBufferImpl.java (IntBufferImpl): Made it a package-private class * java/nio/LongBufferImpl.java (LongBufferImpl): Made it a package-private class * java/nio/ShortBufferImpl.java (ShortBufferImpl): Made it a package-private class * java/nio/channels/FileChannel.java (write): Made final. * java/nio/channels/ServerSocketChannel.java (ServerSocketChanne): Made protected. From-SVN: r68571
2003-06-242003-06-24 Michael Koch <konqueror@gmx.de>Michael Koch1-4/+5
* java/nio/Buffer.java (cap): Made package-private. (pos): Likewise. (limit): Likewise. (mark): Likewise. From-SVN: r68417
2003-06-20MappedByteFileBuffer.java, [...]: RemovedMichael Koch1-0/+277
2003-06-20 Michael Koch <konqueror@gmx.de> * gnu/java/nio/MappedByteFileBuffer.java, gnu/java/nio/natMappedByteFileBuffer.cc: Removed * java/nio/MappedByteBufferImpl.java: New file. * gnu/java/nio/FileChannelImpl.java: Use MappedByteBufferImpl instead of MappedByteFileBuffer. * Makefile.am (ordinary_java_source_files): Removed gnu/java/nio/MappedByteFileBuffer.java and added java/nio/MappedByteBufferImpl.java. (nat_source_files): Removed gnu/java/nio/natMappedByteFileBuffer.cc * Makefile.in: Regenerated. From-SVN: r68259
2003-06-172003-06-17 Michael Koch <konqueror@gmx.de>Michael Koch2-13/+18
* java/nio/DirectByteBufferImpl.java (address): Made package private. (DirectByteBufferImpl): New constructor. * java/nio/natDirectByteBufferImpl.cc (allocateImpl): Moved to java.nio namespace, implemented. (freeImpl): Likewise. (getImpl): Likewise. (putImpl): Likewise. * jni.cc (_Jv_JNI_NewDirectByteBuffer): Implemented. (_Jv_JNI_GetDirectBufferAddress): Implemented. (_Jv_JNI_GetDirectBufferCapacity): Implemented. From-SVN: r68105
2003-06-11MappedByteBuffer.java, [...]: Removed unneeded imports.Michael Koch4-4/+3
2003-06-11 Michael Koch <konqueror@gmx.de> * java/nio/MappedByteBuffer.java, java/nio/channels/Channels.java, java/nio/channels/ServerSocketChannel.java, java/nio/channels/spi/AbstractSelector.java: Removed unneeded imports. From-SVN: r67756
2003-05-20ByteBufferImpl.java, [...]: Moved files to java/nio.Michael Koch22-15/+2793
2003-05-20 Michael Koch <konqueror@gmx.de> * gnu/java/nio/ByteBufferImpl.java, gnu/java/nio/CharBufferImpl.java, gnu/java/nio/CharViewBufferImpl.java, gnu/java/nio/DirectByteBufferImpl.java, gnu/java/nio/DoubleBufferImpl.java, gnu/java/nio/DoubleViewBufferImpl.java, gnu/java/nio/FloatBufferImpl.java, gnu/java/nio/FloatViewBufferImpl.java, gnu/java/nio/IntBufferImpl.java, gnu/java/nio/IntViewBufferImpl.java, gnu/java/nio/LongBufferImpl.java, gnu/java/nio/LongViewBufferImpl.java, gnu/java/nio/natDirectByteBufferImpl.cc, gnu/java/nio/ShortBufferImpl.java, gnu/java/nio/ShortViewBufferImpl.java: Moved files to java/nio. * gnu/java/nio/SocketChannelImpl.java * java/nio/ByteBuffer.java, java/nio/CharBuffer.java, java/nio/DoubleBuffer.java, java/nio/FloatBuffer.java, java/nio/IntBuffer.java, java/nio/LongBuffer.java, java/nio/ShortBuffer.java: Dont import anything. * java/nio/ByteBufferImpl.java, java/nio/CharBufferImpl.java, java/nio/CharViewBufferImpl.java, java/nio/DirectByteBufferImpl.java, java/nio/DoubleBufferImpl.java, java/nio/DoubleViewBufferImpl.java, java/nio/FloatBufferImpl.java, java/nio/FloatViewBufferImpl.java, java/nio/IntBufferImpl.java, java/nio/IntViewBufferImpl.java, java/nio/LongBufferImpl.java, java/nio/LongViewBufferImpl.java, java/nio/natDirectByteBufferImpl.cc, java/nio/ShortBufferImpl.java, java/nio/ShortViewBufferImpl.java: Moved from gnu/java/nio. * Makefile.am (ordinary_java_source_files): Moved files from gnu/java/nio to java/nio. (nat_source_files): Moved natDirectByteBufferImpl.cc from gnu/java/nio to java/nio. * Makefile.in: Regenerated. From-SVN: r66990
2003-05-192003-05-19 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+3
* java/nio/CharBuffer.java (toString): Compile fix. From-SVN: r66953
2003-05-192003-05-19 Michael Koch <konqueror@gmx.de>Michael Koch3-3/+4
* gnu/java/nio/ByteBufferImpl.java (putLong): Fixed conversion to bytes. (putDouble): Fixed conversion to bytes. * gnu/java/nio/DirectByteBufferImpl.java (putLong): Fixed conversion to bytes. (putDouble): Fixed conversion to bytes. * gnu/java/nio/FileLockImpl.java (isValid): Reformatted. * java/nio/Buffer.java (Buffer): Fixed off-by-one bug in handling mark. * java/nio/ByteBuffer.java: Added newline. * java/nio/CharBuffer.java (toString): Don't use relative get to get string data. From-SVN: r66946