aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/ByteBuffer.java
AgeCommit message (Collapse)AuthorFilesLines
2005-07-16Major merge with Classpath.Tom Tromey1-651/+0
Removed many duplicate files. * HACKING: Updated.x * classpath: Imported new directory. * standard.omit: New file. * Makefile.in, aclocal.m4, configure: Rebuilt. * sources.am: New file. * configure.ac: Run Classpath configure script. Moved code around to support. Disable xlib AWT peers (temporarily). * Makefile.am (SUBDIRS): Added 'classpath' (JAVAC): Removed. (AM_CPPFLAGS): Added more -I options. (BOOTCLASSPATH): Simplified. Completely redid how sources are built. Include sources.am. * include/Makefile.am (tool_include__HEADERS): Removed jni.h. * include/jni.h: Removed (in Classpath). * scripts/classes.pl: Updated to look at built classes. * scripts/makemake.tcl: New file. * testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Added -I options. (gcj_jni_invocation_compile_c_to_binary): Likewise. From-SVN: r102082
2005-06-30Update FSF addressKelley Cook1-2/+2
From-SVN: r101453
2004-10-222004-10-22 Michael Koch <konqueror@gmx.de>Michael Koch1-2/+2
* java/lang/Math.java * java/lang/StackTraceElement.java * java/nio/Buffer.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 * java/nio/charset/Charset.java * java/rmi/server/RMIClassLoader.java * java/rmi/server/RMISocketFactory.java * java/security/Policy.java * java/text/ChoiceFormat.java * java/text/CollationElementIterator.java * java/text/DateFormat.java * java/text/DecimalFormat.java * java/text/DecimalFormatSymbols.java * java/text/MessageFormat.java * java/text/NumberFormat.java * java/text/RuleBasedCollator.java * java/text/SimpleDateFormat.java * java/util/BitSet.java * java/util/Calendar.java * java/util/Collections.java * java/util/IdentityHashMap.java * java/util/Locale.java * java/util/TreeMap.java * java/util/logging/LogRecord.java * java/util/logging/XMLFormatter.java * java/util/prefs/AbstractPreferences.java * java/util/prefs/Preferences.java * javax/crypto/interfaces/DHPrivateKey.java * javax/crypto/interfaces/DHPublicKey.java * javax/crypto/interfaces/PBEKey.java * javax/net/ssl/HandshakeCompletedEvent.java * javax/security/auth/Subject.java From-SVN: r89454
2004-09-21ByteBuffer.java (hashCode): Implemented.Sven de Marothy1-2/+18
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 Tobler1-1/+1
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-09Buffer.java, [...]: Fixed javadocs all over.Dalibor Topic1-27/+22
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-042004-05-04 Michael Koch <konqueror@gmx.de>Michael Koch1-23/+18
* 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-02-16ByteBuffer.java (endian): Make non-private so other java.nio classes can ↵Per Bothner1-14/+13
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-08ByteBuffer.java (shiftDown): New helper method.Per Bothner1-2/+8
* 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
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-05-20ByteBufferImpl.java, [...]: Moved files to java/nio.Michael Koch1-3/+1
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-0/+1
* 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
2003-05-132003-05-13 Michael Koch <konqueror@gmx.de>Michael Koch1-140/+161
* gnu/java/nio/ByteBufferImpl.java (ByteBufferImpl): All constructors revised. (slice): Reimplemented. (duplicate): Reimplemented. (asReadOnlyBuffer): Reimplemented. * java/nio/ByteBuffer.java: Reformatted. (array_offset): Renamed from "offset" to match all other buffer classes. (ByteBuffer): All constructors revised. (allocateDirect): Implemented. (allocate): New implementation, documentation reworked. (wrap): Likewise. (get): Documentation reworked. (put): New implementation, documentation reworked. (hasArray): Documentation reworked. (arrayOffset): Likewise. (hashCode): Likewise. (equals): Likewise. (compareTo): Likewise. (order): Likewise. (compact): Likewise. (isDirect): Likewise. (slice): Likewise. (duplicate): Likewise. (asReadOnlyBuffer): Likewise. * Makefile.am (ordinary_java_source_files): Added gnu/java/nio/DirectByteBufferImpl.java. (nat_source_files): Added gnu/java/nio/natDirectByteBufferImpl.cc. * Makefile.in: Regenerated. From-SVN: r66749
2003-05-022003-05-02 Michael Koch <konqueror@gmx.de>Michael Koch1-3/+5
* gnu/java/nio/FileChannelImpl.java (read): New implementation. (implRead): New methods. (write): New implementation, call other write insteal of read method. (implWrite): New methods. (map): Added comment. (transferFrom): Implemented. (transferTo): Implemented. (lock): Added checks to throw exceptions. (truncate): Added check to throw exception. * gnu/java/nio/natFileChannelImpl.cc (implRead): New method. (implWrite): New method. * java/nio/ByteBuffer.java (hashCode): Fixed comment. (get): Fixed exception documentation. (put): Fixed exception documentation. * java/nio/CharBuffer.java: Added comment for later optimizations. From-SVN: r66373
2003-03-172003-03-17 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+1
* java/net/DatagramSocket.java (connect): Fixed comment. * java/nio/ByteBuffer.java (hasArray): Fixed comment. From-SVN: r64487
2003-03-112003-03-11 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+9
* gnu/java/nio/ByteBufferImpl.java (putInt): Use limit() instead of limit. * gnu/java/nio/CharBufferImpl.java (slice): Fixed implementation. (subSequence): Better bounds checking. * gnu/java/nio/MappedByteFileBuffer.java: Import all needed classes directly. * java/nio/ByteBuffer.java (hashCode): New dummy method. * java/nio/CharBuffer.java (array_offset): New member variable. (hasArray): Fixed documentation. (arrayOffset): Return array_offset. From-SVN: r64165
2003-02-132003-02-13 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+396
* java/nio/ByteBuffer.java (endian): New member variable. (get): New methods. (equals): New method. (compareTo): New method. (order): New methods. (compact): New method. (isDirect): New method. (slice): New method. (duplicate): New method. (asReadOnlyBuffer): New method. (asCharBuffer): New method. (asDoubleBuffer): New method. (asFloatBuffer): New method. (asIntBuffer): New method. (asLongBuffer): New method. (asShortBuffer): New method. (get*): New methods. (put*): New methods. (toString): New method. * java/nio/CharBuffer.java (CharBuffer): Implement Comparable instead of Cloneable. (get): May not be final. (put): May not be final. From-SVN: r62836
2003-02-122003-02-12 Michael Koch <konqueror@gmx.de>Michael Koch1-2/+4
* java/nio/ByteBuffer.java (allocate): Implemented. (wrap): Implemented. * java/nio/CharBuffer.java: Some documentation added and reworked. (endian): Removed. (allocate): Implemented. (wrap): Implemented. (array): Throw exceptions. (arrayOffset): Throw exceptions. (toString): Implemented. (length): Implemented. (put): Implemented. (charAt): Implemented. From-SVN: r62760
2003-02-112003-02-11 Michael Koch <konqueror@gmx.de>Michael Koch1-4/+3
* gnu/java/nio/natCharBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natDoubleBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natFloatBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natIntBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natLongBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natShortBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/SelectorProviderImpl.java (openDatagramChannel): Throws IOException. (openPipe): Throws IOException. (openSelector): Throws IOException. (openServerSocketChannel): Throws IOException. (openSocketChannel): Throws IOException. * gnu/java/nio/ServerSocketChannelImpl.java (ServerSocketChannelImpl): Throws IOException. (implCloseSelectableChannel): Throws IOException. (implConfigureBlocking): Throws IOException. * java/nio/ByteBuffer.java (readOnly): Removed. (hasArray): Use isReadOnly() instead of readOnly. (array): Use isReadOnly() instead of readOnly. (arrayOffset): Use isReadOnly() instead of readOnly. * java/nio/CharBuffer.java (CharBuffer): Implements Cloneable and CharSequence. From-SVN: r62688
2003-02-112003-02-11 Michael Koch <konqueror@gmx.de>Michael Koch1-5/+140
* java/nio/Buffer.java (cap, lim, pos, mark): Made private (Buffer): Added package private constructor. * java/nio/ByteBuffer.java (ByteBuffer): Implements Cloneable. (offset): New member variable. (readOnly): New member variable. (backing_buffer): New member variable. (allocateDirect): Throw exception and tell that direct buffers are not supported yet, documentation added. (allocate): Documentation added. (wrap): Documentation added. (ByteBuffer): New constructor. (hasArray): New method. (array): New method. (arrayOffset): New method. (get): Documentation added. (put): Documentation added. * java/nio/CharBuffer.java (CharBuffer): New constructor. (compareTo): Don't access member variables of Buffer directly. * java/nio/DoubleBuffer.java (allocateDirect): Throw exception and tell that direct buffers are not supported yet. * java/nio/FloatBuffer.java (allocateDirect): Throw exception and tell that direct buffers are not supported yet. * java/nio/IntBuffer.java (allocateDirect): Throw exception and tell that direct buffers are not supported yet. * java/nio/LongBuffer.java (allocateDirect): Throw exception and tell that direct buffers are not supported yet. * java/nio/MappedByteBuffer.java (MappedByteBuffer): New method. (force): New method. (isLoaded): New method. (load): New method. * java/nio/ShortBuffer.java (allocateDirect): Throw exception and tell that direct buffers are not supported yet. From-SVN: r62685
2002-11-132002-11-13 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+37
* java/nio/ByteBuffer.java (allocate): New method. (wrap): New method. (put): New method. (get): New method. From-SVN: r59082
2002-10-07ByteBuffer.java: removed import of not commited class.Michael Koch1-2/+0
2002-10-07 Michael Koch <konqueror@gmx.de> * java/nio/ByteBuffer.java: removed import of not commited class. From-SVN: r57900
2002-10-07ByteBuffer.java, [...]: New files, forgot to add these dummies.Michael Koch1-0/+44
2002-10-07 Michael Koch <konqueror@gmx.de> * java/nio/ByteBuffer.java, java/nio/MappedByteBuffer.java: New files, forgot to add these dummies. * Makefile.am (java_native_source_files): Added new files. * Makefile.in: Regenerated. From-SVN: r57899