本文整理了Java中com.sun.mail.iap.Argument.<init>()
方法的一些代码示例,展示了Argument.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Argument.<init>()
方法的具体详情如下:
包路径:com.sun.mail.iap.Argument
类名称:Argument
方法名:<init>
[英]Constructor
[中]建造师
代码示例来源:origin: camunda/camunda-bpm-platform
protected Argument from(String address, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("FROM");
result.writeString(address, charset);
return result;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* PROXYAUTH Command.
*
* @param u the PROXYAUTH user name
* @exception ProtocolException for protocol failures
* @see "Netscape/iPlanet/SunONE Messaging Server extension"
*/
public void proxyauth(String u) throws ProtocolException {
Argument args = new Argument();
args.writeString(u);
simpleCommand("PROXYAUTH", args);
proxyAuthUser = u;
}
代码示例来源:origin: com.sun.mail/javax.mail
protected Argument from(String address, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("FROM");
result.writeString(address, charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* PROXYAUTH Command.
*
* @param u the PROXYAUTH user name
* @exception ProtocolException for protocol failures
* @see "Netscape/iPlanet/SunONE Messaging Server extension"
*/
public void proxyauth(String u) throws ProtocolException {
Argument args = new Argument();
args.writeString(u);
simpleCommand("PROXYAUTH", args);
proxyAuthUser = u;
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected Argument messageid(MessageIDTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("HEADER");
result.writeString("Message-ID");
// XXX confirm that charset conversion ought to be done
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
protected Argument messageid(MessageIDTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("HEADER");
result.writeString("Message-ID");
// XXX confirm that charset conversion ought to be done
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected Argument body(BodyTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("BODY");
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected Argument subject(SubjectTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("SUBJECT");
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
protected Argument subject(SubjectTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("SUBJECT");
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
protected Argument body(BodyTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("BODY");
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* DELETE Command.
*
* @param mbox the mailbox to delete
* @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.4"
*/
public void delete(String mbox) throws ProtocolException {
// encode the mbox as per RFC2060
mbox = BASE64MailboxEncoder.encode(mbox);
Argument args = new Argument();
args.writeString(mbox);
simpleCommand("DELETE", args);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* SUBSCRIBE Command.
*
* @param mbox the mailbox
* @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.6"
*/
public void subscribe(String mbox) throws ProtocolException {
Argument args = new Argument();
// encode the mbox as per RFC2060
mbox = BASE64MailboxEncoder.encode(mbox);
args.writeString(mbox);
simpleCommand("SUBSCRIBE", args);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* UNSUBSCRIBE Command.
*
* @param mbox the mailbox
* @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.7"
*/
public void unsubscribe(String mbox) throws ProtocolException {
Argument args = new Argument();
// encode the mbox as per RFC2060
mbox = BASE64MailboxEncoder.encode(mbox);
args.writeString(mbox);
simpleCommand("UNSUBSCRIBE", args);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* CREATE Command.
*
* @param mbox the mailbox to create
* @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.3"
*/
public void create(String mbox) throws ProtocolException {
// encode the mbox as per RFC2060
mbox = BASE64MailboxEncoder.encode(mbox);
Argument args = new Argument();
args.writeString(mbox);
simpleCommand("CREATE", args);
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected Argument header(HeaderTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("HEADER");
result.writeString(term.getHeaderName());
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
protected Argument header(HeaderTerm term, String charset)
throws SearchException, IOException {
Argument result = new Argument();
result.writeAtom("HEADER");
result.writeString(term.getHeaderName());
result.writeString(term.getPattern(), charset);
return result;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* RENAME Command.
*
* @param o old mailbox name
* @param n new mailbox name
* @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.5"
*/
public void rename(String o, String n) throws ProtocolException {
// encode the mbox as per RFC2060
o = BASE64MailboxEncoder.encode(o);
n = BASE64MailboxEncoder.encode(n);
Argument args = new Argument();
args.writeString(o);
args.writeString(n);
simpleCommand("RENAME", args);
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected Argument recipient(Message.RecipientType type,
String address, String charset)
throws SearchException, IOException {
Argument result = new Argument();
if (type == Message.RecipientType.TO)
result.writeAtom("TO");
else if (type == Message.RecipientType.CC)
result.writeAtom("CC");
else if (type == Message.RecipientType.BCC)
result.writeAtom("BCC");
else
throw new SearchException("Illegal Recipient type");
result.writeString(address, charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
protected Argument recipient(Message.RecipientType type,
String address, String charset)
throws SearchException, IOException {
Argument result = new Argument();
if (type == Message.RecipientType.TO)
result.writeAtom("TO");
else if (type == Message.RecipientType.CC)
result.writeAtom("CC");
else if (type == Message.RecipientType.BCC)
result.writeAtom("BCC");
else
throw new SearchException("Illegal Recipient type");
result.writeString(address, charset);
return result;
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Generate a QRESYNC argument list based on the ResyncData.
*/
private static Argument resyncArgs(ResyncData rd) {
Argument cmd = new Argument();
cmd.writeAtom("QRESYNC");
Argument args = new Argument();
args.writeNumber(rd.getUIDValidity());
args.writeNumber(rd.getModSeq());
UIDSet[] uids = Utility.getResyncUIDSet(rd);
if (uids != null)
args.writeString(UIDSet.toString(uids));
cmd.writeArgument(args);
return cmd;
}
内容来源于网络,如有侵权,请联系作者删除!