Parses a stream containing a MIME message.
parse( stream )
stream | The stream holding the incoming data. | ||
Return | a new Part generated reading the stream. | ||
Raise |
|
Note: To parse a string, use parseString.
Parses a string containing a MIME message.
parseString( string )
string | A string containing a whole MIME message. | ||
Return | a new Part generated by parsing the string. | ||
Raise |
|
quote( text )
Sets the text for this MIME part.
setText( text, [ctype],[cset] )
text | The text to be encoded. |
ctype | Content type of the part; if not given, defaults to "text/plain" |
cset | Type of encoding of the rendered text. If not given, defaults to "utf-8" |
Converts the text string into an string of the given encoding, and prepares the headers of the part so that the transport is notified about the fact that this part is meant to be an encoded text.
The cset parameter, if specificed, must be a character encoding know by Falcon.
setText8Bit( text, ctype, cset )
Transforms this MIME in a string.
toString()
Return | This MIME element rendered as a String. |
Writes this mime-part on the given stream.
write( stream )
stream | The stream where to write the part. |