[squeak-dev] The Trunk: Collections-jcg.124.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Collections-jcg.124.mcz

commits-2
Joshua Gargus uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-jcg.124.mcz

==================== Summary ====================

Name: Collections-jcg.124
Author: jcg
Time: 1 September 2009, 12:53:11 pm
UUID: f670aae4-19f6-429c-a828-8b20b372baec
Ancestors: Collections-ar.123

#mimeEncode: no longer resets the input-stream position before encoding; that was just silly.  See updated tests in CollectionsTests.

Add #base64Encoded to ByteArray (for symmetry with String).

=============== Diff against Collections-ar.123 ===============

Item was changed:
  ----- Method: Base64MimeConverter class>>mimeEncode: (in category 'as yet unclassified') -----
  mimeEncode: aStream
  "Return a ReadWriteStream of characters.  The data of aStream is encoded as 65 innocuous characters.  (See class comment). 3 bytes in aStream goes to 4 bytes in output."
 
  | me |
- aStream position: 0.
  me := self new dataStream: aStream.
  me mimeStream: (ReadWriteStream on: (String new: aStream size + 20 * 4 // 3)).
  me mimeEncode.
  me mimeStream position: 0.
  ^ me mimeStream!

Item was added:
+ ----- Method: ByteArray>>base64Encoded (in category 'converting') -----
+ base64Encoded
+ "Encode the receiver as base64"
+ "'Hello World' asByteArray base64Encoded"
+ ^(Base64MimeConverter mimeEncode: self readStream) contents!