protected function _appendData($data, &$asize)
    {
        if (is_resource($data)) {
            rewind($data);
        }

        /* Since this is body text, with possible embedded charset
         * information, non-ASCII characters are supported. */
        $ob = new Horde_Imap_Client_Data_Format_String_Nonascii($data, array(
            'eol' => true,
            'skipscan' => true
        ));

        // APPEND data MUST be sent in a literal (RFC 3501 [6.3.11]).
        $ob->forceLiteral();

        $asize += $ob->length();

        return $ob;
    }