0 Replies Latest reply on Feb 23, 2009 12:36 PM by Peter Farland

    [svn:fx-3.x] 5042: Modifying Base64Encoder.encode() and encodeBytes() to support the optional offset and length attributes.

    Peter Farland Level 3
      Revision: 5042
      Author: pfarland@adobe.com
      Date: 2009-02-23 12:36:58 -0800 (Mon, 23 Feb 2009)

      Log Message:
      -----------
      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.
      Checkintest: Pass
      Reviewer: Jeff V
      Bugs:
      SDK-15822 - Base64Encoder encodeBytes method doesn't always encode bytes -- incorrect while loop condition

      Ticket Links:
      ------------
      http://bugs.adobe.com/jira/browse/SDK-15822

      Modified Paths:
      --------------
      flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/utils/Base64Encoder.as