Codereview request: 7109837 Provide a mechanism for computing an Adler32 checksum for the contents of a ByteBuffer
xueming.shen at oracle.com
Wed Nov 23 19:39:10 UTC 2011
The webrev has been updated accordingly.
On 11/23/2011 02:58 AM, Alan Bateman wrote:
> On 22/11/2011 23:26, Xueming Shen wrote:
>> java.util.zip.Adler32/CRC32 do not have update method that accepts
>> As of JDK7, you have to copy the content of the ByteBuffer into a
>> byte, then
>> invoke Adler32/CRC32.update() method, which might have significant
>> impact for some applications. Here I'm proposing to add two update
>> methods in
>> j.u.z.Adler32 and CRC32 classes respectively to address this issue.
>> Here is the webrev
> I think the method descriptions could be do with a bit more polish.
> For example you could link to the remaining, position, and limit
> methods. The javadoc could also say that the check sum is not updated
> if there are no bytes remaining. Neither class specifies how nulls are
> handled so you could add a statement to the class description to make
> it clear that NPE is thrown (no need to do this for every method).
> The test looks good but I don't think it's testing that the buffer
> position and limit after the calls to update(ByteBuffer).
More information about the core-libs-dev