public class

Argument

extends Object
java.lang.Object
   ↳ com.google.code.com.sun.mail.iap.Argument

Summary

Fields
protected Vector items
Public Constructors
Argument()
Constructor
Public Methods
void append(Argument arg)
append the given Argument to this Argument.
void write(Protocol protocol)
void writeArgument(Argument c)
Write out as parenthesised list.
void writeAtom(String s)
Write out given string as an Atom.
void writeBytes(Literal b)
Write out given data as a literal.
void writeBytes(ByteArrayOutputStream b)
Write out given ByteArrayOutputStream as a Literal.
void writeBytes(byte[] b)
Write out given byte[] as a Literal.
void writeNumber(long i)
Write out number.
void writeNumber(int i)
Write out number.
void writeString(String s, String charset)
Convert the given string into bytes in the specified charset, and write the bytes out as an ASTRING
void writeString(String s)
Write out given string as an ASTRING, depending on the type of the characters inside the string.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected Vector items

Public Constructors

public Argument ()

Constructor

Public Methods

public void append (Argument arg)

append the given Argument to this Argument. All items from the source argument are copied into this destination argument.

Parameters
arg

public void write (Protocol protocol)

Parameters
protocol
Throws
IOException
ProtocolException

public void writeArgument (Argument c)

Write out as parenthesised list.

Parameters
c

public void writeAtom (String s)

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

public void writeBytes (Literal b)

Write out given data as a literal.

Parameters
b Literal representing data to be written out.

public void writeBytes (ByteArrayOutputStream b)

Write out given ByteArrayOutputStream as a Literal.

Parameters
b ByteArrayOutputStream to be written out.

public void writeBytes (byte[] b)

Write out given byte[] as a Literal.

Parameters
b Byte[] to write out

public void writeNumber (long i)

Write out number.

Parameters
i Number

public void writeNumber (int i)

Write out number.

Parameters
i Number

public void writeString (String s, String charset)

Convert the given string into bytes in the specified charset, and write the bytes out as an ASTRING

Parameters
s
charset
Throws
UnsupportedEncodingException

public void writeString (String s)

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