public class Argument extends Object
Constructor and Description |
---|
Argument()
Constructor
|
Modifier and Type | Method and Description |
---|---|
Argument |
append(Argument arg)
Append the given Argument to this Argument.
|
void |
write(Protocol protocol) |
Argument |
writeArgument(Argument c)
Write out as parenthesised list.
|
Argument |
writeAtom(String s)
Write out given string as an Atom.
|
Argument |
writeBytes(byte[] b)
Write out given byte[] as a Literal.
|
Argument |
writeBytes(ByteArrayOutputStream b)
Write out given ByteArrayOutputStream as a Literal.
|
Argument |
writeBytes(Literal b)
Write out given data as a literal.
|
Argument |
writeNString(String s)
Write out given string as an NSTRING, depending on the type
of the characters inside the string.
|
Argument |
writeNString(String s,
Charset charset)
Convert the given string into bytes in the specified
charset, and write the bytes out as an NSTRING
|
Argument |
writeNString(String s,
String charset)
Convert the given string into bytes in the specified
charset, and write the bytes out as an NSTRING
|
Argument |
writeNumber(int i)
Write out number.
|
Argument |
writeNumber(long i)
Write out number.
|
Argument |
writeString(String s)
Write out given string as an ASTRING, depending on the type
of the characters inside the string.
|
Argument |
writeString(String s,
Charset charset)
Convert the given string into bytes in the specified
charset, and write the bytes out as an ASTRING
|
Argument |
writeString(String s,
String charset)
Convert the given string into bytes in the specified
charset, and write the bytes out as an ASTRING
|
public Argument append(Argument arg)
arg
- the Argument to appendpublic Argument writeString(String s)
XXX: Hmm .. this should really be called writeASCII()
s
- String to write outpublic Argument writeString(String s, String charset) throws UnsupportedEncodingException
s
- String to write outcharset
- the charsetUnsupportedEncodingException
- for bad charsetpublic Argument writeString(String s, Charset charset)
s
- String to write outcharset
- the charsetpublic Argument writeNString(String s)
s
- String to write outpublic Argument writeNString(String s, String charset) throws UnsupportedEncodingException
s
- String to write outcharset
- the charsetUnsupportedEncodingException
- for bad charsetpublic Argument writeNString(String s, Charset charset)
s
- String to write outcharset
- the charsetpublic Argument writeBytes(byte[] b)
b
- byte[] to write outpublic Argument writeBytes(ByteArrayOutputStream b)
b
- ByteArrayOutputStream to be written out.public Argument writeBytes(Literal b)
b
- Literal representing data to be written out.public Argument writeAtom(String s)
s
- Stringpublic Argument writeNumber(int i)
i
- numberpublic Argument writeNumber(long i)
i
- numberpublic Argument writeArgument(Argument c)
c
- the Argumentpublic void write(Protocol protocol) throws IOException, ProtocolException
IOException
ProtocolException
Copyright © 2021 JBoss by Red Hat. All rights reserved.