History log of /libcore/luni/src/main/java/java/nio/IntBuffer.java
Revision Date Author Comments
2589e301d1fb85960045c9ef29682d7e73b1aee7 05-Nov-2013 Narayan Kamath <narayan@google.com> Make effectiveDirectAddress final.

Also add a unit test to make sure elementSizeShift
is set correctly.

Change-Id: Ia6c797001a768fa1c3136d475f2ac0e047b35fb0
ac96decfea84ebdccb308492acb01454c8823c2c 05-Nov-2013 Narayan Kamath <narayan@google.com> Don't force MemoryBlocks on classes that don't care.

Only MappedByteBuffer and DirectByteBuffer need to know
about this abstraction.

Change-Id: I293284c8b8a73ac01463337dc8a1e22d16cd378d
38f3983aed5a093c17d1f68c1517bbc72c2862ea 15-Oct-2013 Elliott Hughes <enh@google.com> Use @throws rather than the deprecated and unusual @exception.

Change-Id: I69d94fae14a6153ef227352e1e159697db8d618d
223ab34ad4890414b278a1e7893a99220c8f3203 27-Aug-2013 Elliott Hughes <enh@google.com> Fix ByteBuffer.duplicate documentation.

Bug: https://code.google.com/p/android/issues/detail?id=59403

(cherry picked from commit 1c298efc60083a2ce5bdbf3febb942f5ce4c621d)

Change-Id: Iff5df247768e87cc92cb7dcc390fe58dc738642f
1c298efc60083a2ce5bdbf3febb942f5ce4c621d 27-Aug-2013 Elliott Hughes <enh@google.com> Fix ByteBuffer.duplicate documentation.

Bug: https://code.google.com/p/android/issues/detail?id=59403
Change-Id: I5107cb8e5c486fcf1fa9080c5c248a63d8d50665
fe5da19e0e366286cd4d95f7628fe9442b9062c8 27-Mar-2013 Elliott Hughes <enh@google.com> Simplify the nio Buffer implementations, and fix MappedByteBuffer.

* Fix the reported bug caused by delegation in the MappedByteBuffer
implementation.

* Collapse the three classes (ReadOnly*, ReadWrite*, and *) used
to implement most buffer types into one class each.

* Rename HeapByteBuffer to ByteArrayBuffer to match its companions.

* Remove BaseByteBuffer.

* Give the classes used to implement asXBuffer sane names (their
existing names were backwards).

Bug: https://code.google.com/p/android/issues/detail?id=53637
Change-Id: I2a7ff4f1d502564389615384324afadabccb04f9
126ab1b546c71137a97cef68cc89267e7f7be634 28-Aug-2012 Elliott Hughes <enh@google.com> Improve nio IllegalArgumentException detail messages.

Bug: 7005326
Change-Id: Ibab8b776865dbed5da062cc683f834a79f068b32
fb0ec0e650bf8be35acb0d47da0311a7c446aa33 14-Jan-2011 Elliott Hughes <enh@google.com> Remove useless android-changed comments.

I've changed useful ones to regular comments or TODOs, as appropriate.

I've left ones in code like java.util.concurrent where we really are
tracking an upstream source, making the change markers useful.

I've left a handful of others where I intend to actually investigate
the implied TODOs before deciding how to resolve them.

Change-Id: Iaf71059b818596351cf8ee5a3cf3c85586051fa6
a1603838fe9e865575c87982e32c6343740e464c 11-Dec-2010 Elliott Hughes <enh@google.com> Lots more bounds-checking/exception-throwing consistency.

Overflow-safe checks all round, plus better detail messages. This isn't
quite everything, but it's a large chunk of the work. Most notably, this
is all of io and nio.

There are numerous changes of exception priority here, and the harmony
tests noticed a subset of them in the nio code. I've modified our checked-out
copy of the tests to accept any of the throwable exceptions.

Change-Id: Id185f1228fb9a1d5fc9494e78375b5623fb0fe14
0e1b748ecabf720065a632f28330f5d4d037d5ae 10-Sep-2010 Elliott Hughes <enh@google.com> Consistent naming for get/put/wrap arguments.

Bug: 2935622
Change-Id: Icb39392f9106f9fe5ba70ccdcb6b059dbf5617bc
0c53cf8b2c46deb41e91db50ddc17d598cc64a10 09-Sep-2010 Elliott Hughes <enh@google.com> Speed up MappedByteBuffer.

Make it possible to override limit(int) and position(int) internally, so I can
avoid updating MappedByteBufferAdapter's wrapped ByteBuffer's limit and
position on every get or put. I still need to do extra work with position if
you use the get/put overloads that don't take an index, but even that becomes
cheaper. The indexed overloads benefit the most, though. Before:

benchmark before after (both us)

ByteBuffer_getByte 830 757
ByteBuffer_getChar 940 875

ByteBuffer_getByte_indexed 800 509
ByteBuffer_getChar_indexed 936 643

Also factor out duplicated toString implementations.

Bug: 2935622
Change-Id: I4cfe206fde638bddb5a7b4a62223e2588f44b8ac
934767b07d94041390785d8fe66c86b2379730bc 09-Sep-2010 Elliott Hughes <enh@google.com> Fix build (non-final _elementSizeShift).

Bug: 2935622
Change-Id: I5ff543b11e055a25676444d7ba9f0bb939544816
29dbfe19b113a13b712be2bc762ef1c81cd06c47 03-Sep-2010 Elliott Hughes <enh@google.com> Use finalizers to free direct buffers.

Also switch to a cheaper scheme for avoiding double-frees (which could only
happen if library code is broken; at the moment the only caller is the
iovec-style stuff). This halves the cost of direct buffer access, at the
unimportant cost of not throwing an exception if we try to access a buffer
we freed while we still had a reference to it.

Also use named constants for the sizes of primitive types.

Also kill BufferFactory.

Bug: 2935622
Change-Id: I6021ce7531f49d8cff7635d6d2cc54851bacaf69
ccbe3404e0691dab506d017550658e8e5974c83e 10-Jul-2010 Elliott Hughes <enh@google.com> Use 'dst' (or an even more appropriate name where possible) rather than 'dest'.

(The ArrayIndexOutOfBoundsException for System.arraycopy already talks
about 'dst' and 'dstPos'.)

Change-Id: Iba9415dd4a9ec3b457938ea4469b4a0024bab6e4
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
fd6bb3510c2f94d636f3572dcf5f7f4dcd1a2726 13-May-2010 Elliott Hughes <enh@google.com> Remove //$NON-NLS-\d$ cruft.

Mostly done by perl(1), with manual cleanup of the few misspelled instances.
This makes our trailing whitespace slightly worse, but I'll fix all that with
a follow-on change.

Change-Id: I0b4ca98819be6f9519c4ba980d759bd1ee1a0303
3ff29eb11a241d58c54ecc84230bb0672f4aa148 23-Apr-2010 Peter Hallam <peterhal@google.com> More merging of nio into luni

Change-Id: Ib4356b3cd57490df8ff246ea6a4bc1c269ba848b