Base64.isArrayByteBase64() method is inefficient for large byte arrays because it uses a temporary copy of the data to eliminate whitespace.
This is very wasteful for large arrays, and is completely unnecessary.
The code should just add a check for whitespace as part of the main loop.
Patch to follow
Description
Base64.isArrayByteBase64() method is inefficient for large byte arrays because it uses a temporary copy of the data to eliminate whitespace.
This is very wasteful for large arrays, and is completely unnecessary.
The code should just add a check for whitespace as part of the main loop.
Patch to follow
I've also deprecated the discardWhitespace method. It's package private, but I guess someone could be extending Base64 and using that method through inheritance.
Henri Yandell added a comment - 01/Jul/08 04:38 AM Looks good. Patch applied.
I've also deprecated the discardWhitespace method. It's package private, but I guess someone could be extending Base64 and using that method through inheritance.
Applying Sebb's patch from CODEC-71, improving the memory consumption of isArrayByteBase64(). I've also deprecated the discardWhitespace method as nothing uses it now
I've also deprecated the discardWhitespace method. It's package private, but I guess someone could be extending Base64 and using that method through inheritance.