Modifying Base64Encoder.encode() and encodeBytes() to support the optional offset and length attributes. Previously if the offset + length ended up being greater than the amount of data available, junk null bytes were being added as padding to the end of the base64 encoded String. Although throwing an index out of bounds error would be the preferred solution as is the case on the server, after discussion with BlazeDS this change avoids introducing unexpected exceptions and simply truncates the data to the amount available.
QE: Yes, please ensure we cover the two optional attributes of encode() and encodeBytes() on Base64Encoder.
Doc: Yes, I'll add a release note to the bug to describe this fix for 3.4.
Reviewer: Jeff V
SDK-15822 - Base64Encoder encodeBytes method doesn't always encode bytes -- incorrect while loop condition