diff options
author | Alan Young <consult.awy@gmail.com> | 2015-07-08 10:43:39 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-08-13 08:08:30 (GMT) |
commit | 563ab00f95281f61a0aa5ae96fb5aacedac9b900 (patch) | |
tree | fc8fd98d13d4a8c616fabcacb95b87201c49f018 /test | |
parent | 9bf162922691c1f45813da6a21f2e274bfad3114 (diff) | |
download | stroke-563ab00f95281f61a0aa5ae96fb5aacedac9b900.zip stroke-563ab00f95281f61a0aa5ae96fb5aacedac9b900.tar.bz2 |
Rework ByteArray implementation
Use and ArrayList<byte[]> as the internal storage, instead of
Vector<Byte>.
Constructors and methods that supply a byte[] to add to the instance
will have that value copied, rather than just taking ownership of the
byte[]. There is an argument, on efficiency grounds, for providing
methods that take ownership of the supplied argument.
The earlier discussions about use of synchronization in the class are
revisited. This is a low-level container that should be thread-safe or
take precautions against non-thread-safe use. It is anticipated that the
vast majority of uses will be thread-safe. Use of synchronization
permits occasional deviations from this without imposing any significant
overhead for the normal case - uncontended synchronization is close to
free.
Change-Id: Ifb7b2915d5c96345c53aec8e33673d892c430431
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions