[squeak-dev] The Trunk: Collections-pre.786.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 20 08:04:53 UTC 2018


Patrick Rein uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-pre.786.mcz

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

Name: Collections-pre.786
Author: pre
Time: 20 April 2018, 10:03:48.482703 am
UUID: 749ef5a4-6cb3-884d-a03d-226d0072660a
Ancestors: Collections-cmm.785

Adds the convenience function for choosing a MIMEConverter and a NullMimeConverter

=============== Diff against Collections-cmm.785 ===============

Item was changed:
  ----- Method: MimeConverter class>>forEncoding: (in category 'convenience') -----
  forEncoding: encodingString
+ 	"Answer a converter class for the given encoding"
+ 	encodingString ifNil: [^ NullMimeConverter].
- 	"Answer a converter class for the given encoding or nil if unknown"
- 	encodingString ifNil: [^nil].
  	^ encodingString asLowercase caseOf: 
  		{ ['base64'] -> [Base64MimeConverter].
+ 		   ['quoted-printable'] -> [QuotedPrintableMimeConverter].
+ 		   ['7bit'] -> [Bit7MimeConverter].
+ 		   ['8bit'] -> [NullMimeConverter].
+ 		   ['binary'] -> [NullMimeConverter] }
+ 		otherwise: [NullMimeConverter].
- 		  ['quoted-printable'] -> [QuotedPrintableMimeConverter]}
- 		otherwise: [].
  !

Item was added:
+ MimeConverter subclass: #NullMimeConverter
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Collections-Streams'!

Item was added:
+ ----- Method: NullMimeConverter>>mimeDecode (in category 'as yet unclassified') -----
+ mimeDecode
+ 
+ 	dataStream nextPutAll: mimeStream upToEnd.
+ 	^ dataStream!

Item was added:
+ ----- Method: NullMimeConverter>>mimeEncode (in category 'as yet unclassified') -----
+ mimeEncode
+ 
+ 	mimeStream nextPutAll: dataStream upToEnd.
+ 	^ mimeStream
+ !



More information about the Squeak-dev mailing list