|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.util.Strings
This class provides a set of static functions for building string representations of complex structures.
Field Summary | |
static int |
listBorder
Controls the formatting of lists of objects. |
static int |
listMax
Controls the formatting of lists of objects. |
Constructor Summary | |
Strings()
|
Method Summary | |
static void |
toByteArray(java.io.ByteArrayOutputStream output,
java.lang.String str)
Provides a Java string literal representing the parameter string. |
static java.lang.String |
toString(java.util.Hashtable table)
Provides a string representation of a hash table of objects. |
static java.lang.String |
toString(java.lang.Object obj)
Provides a string representation of an object. |
static java.lang.String |
toString(java.lang.String str)
Provides a Java string literal representing the parameter string. |
static void |
toString(java.lang.StringBuffer output,
boolean[] tab)
Provides a string representation of an array of booleans. |
static void |
toString(java.lang.StringBuffer output,
byte[] tab)
Provides a string representation of an array of bytes. |
static void |
toString(java.lang.StringBuffer output,
char[] tab)
Provides a string representation of an array of chars. |
static void |
toString(java.lang.StringBuffer output,
double[] tab)
Provides a string representation of an array of doubles. |
static void |
toString(java.lang.StringBuffer output,
float[] tab)
Provides a string representation of an array of floats. |
static void |
toString(java.lang.StringBuffer output,
java.util.Hashtable table)
Provides a string representation of a hash table of objects. |
static void |
toString(java.lang.StringBuffer output,
int[] tab)
Provides a string representation of an array of ints. |
static void |
toString(java.lang.StringBuffer output,
long[] tab)
Provides a string representation of an array of longs. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object obj)
Provides a string representation of an object. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object obj,
java.lang.Class type)
Provides a string representation of an array. |
static void |
toString(java.lang.StringBuffer output,
short[] tab)
Provides a string representation of an array of shorts. |
static void |
toString(java.lang.StringBuffer output,
java.lang.String str)
Provides a Java string literal representing the parameter string. |
static void |
toString(java.lang.StringBuffer output,
java.util.Vector vector)
Provides a string representation of a vector of objects. |
static java.lang.String |
toString(java.util.Vector vector)
Provides a string representation of a vector of objects. |
static java.lang.String |
toStringArray(java.lang.Object tab)
Provides a string representation of an array. |
static void |
toStringArray(java.lang.StringBuffer output,
java.lang.Object tab)
Provides a string representation of an array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int listMax
listMax
are entirely printed. A value of
-1
leads to complete printing of the list, whatever its size.
This variable, when used in an agent server, may be set by the debug
variable Debug.var.fr.dyade.aaa.util.listMax
. Its default value is
10
.
public static int listBorder
listMax
are partially printed, with
the listBorder
leading and trailing elements.
This variable, when used in an agent server, may be set by the debug
variable Debug.var.fr.dyade.aaa.util.listBorder
. Its default value is
3
.
Constructor Detail |
public Strings()
Method Detail |
public static final void toString(java.lang.StringBuffer output, java.lang.Object obj)
toString
function for the object
class, or calls the toString
function of the object.
output
- a buffer to print the object intoobj
- the object to printpublic static final java.lang.String toString(java.lang.Object obj)
toString(StringBuffer)
.
obj
- the object to print
public static final void toByteArray(java.io.ByteArrayOutputStream output, java.lang.String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
output
- a byte buffer to print the object intostr
- the string to printpublic static final void toString(java.lang.StringBuffer output, java.lang.String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
output
- a string buffer to print the object intostr
- the string to printpublic static final java.lang.String toString(java.lang.String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
str
- the string to print
public static final void toString(java.lang.StringBuffer output, java.lang.Object obj, java.lang.Class type)
listMax
and listBorder
variables.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentspublic static final void toStringArray(java.lang.StringBuffer output, java.lang.Object tab)
toString(StringBuffer, Object, Class)
.
output
- a buffer to print the object intotab
- the array to printpublic static final java.lang.String toStringArray(java.lang.Object tab)
toString(StringBuffer, Object, Class)
.
tab
- the array to print
public static final void toString(java.lang.StringBuffer output, boolean[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, byte[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, char[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, short[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, int[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, long[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, float[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, double[] tab)
listMax
and listBorder
variables.
output
- a buffer to print the object intotab
- the array to printpublic static final void toString(java.lang.StringBuffer output, java.util.Vector vector)
listMax
and listBorder
variables.
output
- a buffer to print the object intovector
- the vector of Object
objects to printpublic static final java.lang.String toString(java.util.Vector vector)
toString(StringBuffer, ...)
.
vector
- the vector of Object
objects to print
public static final void toString(java.lang.StringBuffer output, java.util.Hashtable table)
listMax
and listBorder
variables.
output
- a buffer to print the object intotable
- the table of Object
objects to printpublic static final java.lang.String toString(java.util.Hashtable table)
toString(StringBuffer, ...)
.
table
- the table of Object
objects to print
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |