MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
/** * EXAMINE Command. * * @see "RFC2060, section 6.3.2" */ public MailboxInfo examine(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); Response[] r = command("EXAMINE", args); // Note that MailboxInfo also removes those responses // it knows about MailboxInfo minfo = new MailboxInfo(r); minfo.mode = Folder.READ_ONLY; // Obviously // dispatch any remaining untagged responses notifyResponseHandlers(r); handleResult(r[r.length-1]); return minfo; }
/** * EXAMINE Command. * * @see "RFC2060, section 6.3.2" */ public MailboxInfo examine(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); Response[] r = command("EXAMINE", args); // Note that MailboxInfo also removes those responses // it knows about MailboxInfo minfo = new MailboxInfo(r); minfo.mode = Folder.READ_ONLY; // Obviously // dispatch any remaining untagged responses notifyResponseHandlers(r); handleResult(r[r.length-1]); return minfo; }
/** * SELECT Command. * * @see "RFC2060, section 6.3.1" */ public MailboxInfo select(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); Response[] r = command("SELECT", args); // Note that MailboxInfo also removes those responses // it knows about MailboxInfo minfo = new MailboxInfo(r); // dispatch any remaining untagged responses notifyResponseHandlers(r); Response response = r[r.length-1]; if (response.isOK()) { // command succesful if (response.toString().indexOf("READ-ONLY") != -1) minfo.mode = Folder.READ_ONLY; else minfo.mode = Folder.READ_WRITE; } handleResult(response); return minfo; }
/** * SELECT Command. * * @see "RFC2060, section 6.3.1" */ public MailboxInfo select(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); Response[] r = command("SELECT", args); // Note that MailboxInfo also removes those responses // it knows about MailboxInfo minfo = new MailboxInfo(r); // dispatch any remaining untagged responses notifyResponseHandlers(r); Response response = r[r.length-1]; if (response.isOK()) { // command succesful if (response.toString().indexOf("READ-ONLY") != -1) minfo.mode = Folder.READ_ONLY; else minfo.mode = Folder.READ_WRITE; } handleResult(response); return minfo; }
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);
MailboxInfo minfo = new MailboxInfo(r);