com.sun.mail.iap.Argument.writeString()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中com.sun.mail.iap.Argument.writeString()方法的一些代码示例,展示了Argument.writeString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Argument.writeString()方法的具体详情如下:
包路径:com.sun.mail.iap.Argument
类名称:Argument
方法名:writeString

Argument.writeString介绍

[英]Write out given string as an ASTRING, depending on the type of the characters inside the string. The string should contain only ASCII characters.

XXX: Hmm .. this should really be called writeASCII()
[中]根据字符串中字符的类型,将给定字符串作为字符串写出。字符串应仅包含ASCII字符。
XXX:嗯。。这实际上应该称为writeASCII()

代码示例

代码示例来源: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: 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: 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: 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: 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 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

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

/**
 * 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

/**
 * 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

/**
 * 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

/**
 * 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 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: camunda/camunda-bpm-platform

/**
 * DELETEACL Command.
 *
 * @param    mbox    the mailbox
 * @param    user    the user
 * @exception    ProtocolException    for protocol failures
 * @see "RFC2086"
 */
public void deleteACL(String mbox, String user) throws ProtocolException {
if (!hasCapability("ACL")) 
  throw new BadCommandException("ACL not supported");
// encode the mbox as per RFC2060
mbox = BASE64MailboxEncoder.encode(mbox);
Argument args = new Argument();	
args.writeString(mbox);
args.writeString(user);
Response[] r = command("DELETEACL", args);
Response response = r[r.length-1];
// dispatch untagged responses
notifyResponseHandlers(r);
handleResult(response);
}

相关文章