22.2Functions

parse

Parses a stream containing a MIME message.

parse( stream )
stream The stream holding the incoming data.
Returna new Part generated reading the stream.
Raise
ParseError if the stream is not in MIME format.

Note: To parse a string, use parseString.

parseString

Parses a string containing a MIME message.

parseString( string )
string A string containing a whole MIME message.
Returna new Part generated by parsing the string.
Raise
ParseError if the stream is not in MIME format.

quote

quote( text )

setText

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

setText8Bit( text, ctype, cset )

toString

Transforms this MIME in a string.

toString()
ReturnThis MIME element rendered as a String.

write

Writes this mime-part on the given stream.

write( stream )
stream The stream where to write the part.
Made with http://www.falconpl.org