public class Argument
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.List<java.lang.Object> |
items |
| Constructor | Description |
|---|---|
Argument() |
Constructor
|
| Modifier and Type | Method | 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(java.lang.String s) |
Write out given string as an Atom.
|
Argument |
writeBytes(byte[] b) |
Write out given byte[] as a Literal.
|
Argument |
writeBytes(Literal b) |
Write out given data as a literal.
|
Argument |
writeBytes(java.io.ByteArrayOutputStream b) |
Write out given ByteArrayOutputStream as a Literal.
|
Argument |
writeNString(java.lang.String s) |
Write out given string as an NSTRING, depending on the type
of the characters inside the string.
|
Argument |
writeNString(java.lang.String s,
java.lang.String charset) |
Convert the given string into bytes in the specified
charset, and write the bytes out as an NSTRING
|
Argument |
writeNString(java.lang.String s,
java.nio.charset.Charset 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(java.lang.String s) |
Write out given string as an ASTRING, depending on the type
of the characters inside the string.
|
Argument |
writeString(java.lang.String s,
java.lang.String charset) |
Convert the given string into bytes in the specified
charset, and write the bytes out as an ASTRING
|
Argument |
writeString(java.lang.String s,
java.nio.charset.Charset 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(java.lang.String s)
XXX: Hmm .. this should really be called writeASCII()
s - String to write outpublic Argument writeString(java.lang.String s, java.lang.String charset) throws java.io.UnsupportedEncodingException
s - String to write outcharset - the charsetjava.io.UnsupportedEncodingException - for bad charsetpublic Argument writeString(java.lang.String s, java.nio.charset.Charset charset)
s - String to write outcharset - the charsetpublic Argument writeNString(java.lang.String s)
s - String to write outpublic Argument writeNString(java.lang.String s, java.lang.String charset) throws java.io.UnsupportedEncodingException
s - String to write outcharset - the charsetjava.io.UnsupportedEncodingException - for bad charsetpublic Argument writeNString(java.lang.String s, java.nio.charset.Charset charset)
s - String to write outcharset - the charsetpublic Argument writeBytes(byte[] b)
b - byte[] to write outpublic Argument writeBytes(java.io.ByteArrayOutputStream b)
b - ByteArrayOutputStream to be written out.public Argument writeBytes(Literal b)
b - Literal representing data to be written out.public Argument writeAtom(java.lang.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 java.io.IOException, ProtocolException
java.io.IOExceptionProtocolExceptionCopyright © 2018 Oracle. All rights reserved.