|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--sexp.BaseSexp
|
+--sexp.Sexp
This class implements the octet-string aspect of a SExpression.
SExpression,
SList| Field Summary | |
private static String |
__me
|
String |
byte_encoding
Encoding used when converting from a byte array to whatever. |
protected String |
cached_hint
|
protected String |
cached_string
|
private static boolean |
debug
|
protected static String |
default_encoding
|
protected SimpleString |
hint
|
private static boolean |
pedantic
|
protected SimpleString |
string
|
String |
string_encoding
Encoding used when converting from a String to whatever. |
| Fields inherited from class sexp.BaseSexp |
__me |
| Fields inherited from interface sexp.SExpression |
versionString |
| Constructor Summary | |
Sexp(byte[] ba)
Instantiate and initialize an octet-string from a byte array. |
|
Sexp(byte[] ba,
byte[] hint)
Instantiate and initialize an octet-string from a byte array. |
|
Sexp(SimpleString input)
Instantiate and initialize an octet-string from a SimpleString |
|
Sexp(SimpleString input,
SimpleString hint)
Instantiate and initialize an octet-string and its displayhint from SimpleStrings. |
|
Sexp(String s)
Instantiate and initialize an octet-string from the string s. |
|
| Method Summary | |
void |
clearHint()
Clears this object's presentation hint. |
Object |
clone()
Return a clone of this object. |
SExpression |
copy()
Return a copy of this object. |
boolean |
equals(Object that)
See if this S-Expression is equal to the given Object. |
void |
finalize()
|
void |
free()
Destroy and free the resouces associated with this Sexp. |
byte[] |
getBytes()
Get raw data. |
SimpleString |
getHint()
Returns any presentation-hint associated with this S-Expression. |
SimpleString |
getString()
Returns the SimpleString of this S-Expression. |
boolean |
isList()
Returns true if this S-Expression is a list of simpler S-Expressions, or false if this object is an octet-string object. |
static boolean |
isStartofHint(char c)
Determine if character might be in start of S-Expression presentation-/display-hint. |
static boolean |
isStartofSexp(char c)
Determine if character might be in start of S-Expression. |
void |
setHint(byte[] input)
Set the presentation-hint associated with this S-Expression. |
void |
setHint(SimpleString input)
Set the presentation-hint associated with this S-Expression. |
void |
setHint(String input)
Set the presentation-hint associated with this S-Expression. |
private static byte[] |
silentconvert(String s,
String caller)
|
String |
toString()
Returns this S-Expression in its Advanced representation, as a String. |
| Methods inherited from class sexp.BaseSexp |
toAdvanced,
toAdvanced,
toCanonical,
toCanonical,
toTransport,
toTransport |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String __me
protected static String default_encoding
public String string_encoding
public String byte_encoding
protected SimpleString string
protected SimpleString hint
protected String cached_string
protected String cached_hint
private static boolean debug
private static boolean pedantic
| Constructor Detail |
public Sexp(SimpleString input)
input - Simplestring to construct this object from
public Sexp(SimpleString input,
SimpleString hint)
input - Simplestring to construct this object fromhint - this object's displayhint. May be null
public Sexp(byte[] ba)
throws SexpException
ba - Byte array to build this object from.
public Sexp(byte[] ba,
byte[] hint)
throws SexpException
ba - Byte array to build this object from.hint - Byte array to build this object's display hint from.
public Sexp(String s)
throws SexpException
Sexp(byte[])| Method Detail |
public void finalize()
throws Throwable
private static byte[] silentconvert(String s,
String caller)
public Object clone()
throws CloneNotSupportedException
public SExpression copy()
public void free()
public boolean isList()
public boolean equals(Object that)
that - Object to compare this object with. If the object is of some
other class than sexp.SimpleString or java.lang.String, its toString()
method is called and the comparison uses the result.public String toString()
public byte[] getBytes()
throws SexpException
public SimpleString getString()
public SimpleString getHint()
public void setHint(SimpleString input)
throws SexpException
input - byte array to construct presentation hint from.
public void setHint(byte[] input)
throws SexpException
input - byte array to construct presentation hint from.
public void setHint(String input)
throws SexpException
public void clearHint()
public static boolean isStartofSexp(char c)
public static boolean isStartofHint(char c)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||