for (int i=0; i < mMessages.length; i++) { Pop3Msg pm = mMessages[i];
for (int i=0; i < mMessages.size(); i++) { Pop3Msg pm = (Pop3Msg) mMessages.get(i);
    public int deleteMarked(boolean hard) throws ServiceException, Pop3CmdException {        Mailbox mbox = Mailbox.getMailboxById(mId);        int count = 0;        int failed = 0;        for (int i=0; i < mMessages.length; i++) {            Pop3Msg pm = mMessages[i];            if (pm.isDeleted()) {                try {                    if (hard) {                        mbox.delete(mOpContext, pm.getId(), MailItem.TYPE_MESSAGE);                                            } else {                        mbox.move(mOpContext, pm.getId(), MailItem.TYPE_MESSAGE, Mailbox.ID_FOLDER_TRASH);                    }                    count++;                                    } catch (ServiceException e) {                    failed++;                }                mNumDeleted--;                mDeletedSize -= pm.getSize();                pm.mDeleted = false;            }        }        if (failed != 0) {            throw new Pop3CmdException("deleted "+count+"/"+(count+failed)+" message(s)");        }        return count;    }