Package com.sun.mail.iap
Class Argument
java.lang.Object
com.sun.mail.iap.Argument
- Author:
- John Mani, Bill Shannon
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAppend the given Argument to this Argument.void
Write out as parenthesised list.Write out given string as an Atom.writeBytes
(byte[] b) Write out given byte[] as a Literal.Write out given data as a literal.Write out given ByteArrayOutputStream as a Literal.Write out given string as an NSTRING, depending on the type of the characters inside the string.writeNString
(String s, String charset) Convert the given string into bytes in the specified charset, and write the bytes out as an NSTRINGwriteNString
(String s, Charset charset) Convert the given string into bytes in the specified charset, and write the bytes out as an NSTRINGwriteNumber
(int i) Write out number.writeNumber
(long i) Write out number.Write out given string as an ASTRING, depending on the type of the characters inside the string.writeString
(String s, String charset) Convert the given string into bytes in the specified charset, and write the bytes out as an ASTRINGwriteString
(String s, Charset charset) Convert the given string into bytes in the specified charset, and write the bytes out as an ASTRING
-
Field Details
-
items
-
-
Constructor Details
-
Argument
public Argument()Constructor
-
-
Method Details
-
append
Append the given Argument to this Argument. All items from the source argument are copied into this destination argument.- Parameters:
arg
- the Argument to append- Returns:
- this
-
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()
- Parameters:
s
- String to write out- Returns:
- this
-
writeString
Convert the given string into bytes in the specified charset, and write the bytes out as an ASTRING- Parameters:
s
- String to write outcharset
- the charset- Returns:
- this
- Throws:
UnsupportedEncodingException
- for bad charset
-
writeString
Convert the given string into bytes in the specified charset, and write the bytes out as an ASTRING- Parameters:
s
- String to write outcharset
- the charset- Returns:
- this
- Since:
- JavaMail 1.6.0
-
writeNString
Write out given string as an NSTRING, depending on the type of the characters inside the string. The string should contain only ASCII characters.- Parameters:
s
- String to write out- Returns:
- this
- Since:
- JavaMail 1.5.1
-
writeNString
Convert the given string into bytes in the specified charset, and write the bytes out as an NSTRING- Parameters:
s
- String to write outcharset
- the charset- Returns:
- this
- Throws:
UnsupportedEncodingException
- for bad charset- Since:
- JavaMail 1.5.1
-
writeNString
Convert the given string into bytes in the specified charset, and write the bytes out as an NSTRING- Parameters:
s
- String to write outcharset
- the charset- Returns:
- this
- Since:
- JavaMail 1.6.0
-
writeBytes
Write out given byte[] as a Literal.- Parameters:
b
- byte[] to write out- Returns:
- this
-
writeBytes
Write out given ByteArrayOutputStream as a Literal.- Parameters:
b
- ByteArrayOutputStream to be written out.- Returns:
- this
-
writeBytes
Write out given data as a literal.- Parameters:
b
- Literal representing data to be written out.- Returns:
- this
-
writeAtom
Write out given string as an Atom. Note that an Atom can contain only certain US-ASCII characters. No validation is done on the characters in the string.- Parameters:
s
- String- Returns:
- this
-
writeNumber
Write out number.- Parameters:
i
- number- Returns:
- this
-
writeNumber
Write out number.- Parameters:
i
- number- Returns:
- this
-
writeArgument
Write out as parenthesised list.- Parameters:
c
- the Argument- Returns:
- this
-
write
- Throws:
IOException
ProtocolException
-