de.jstacs.io
Class XMLParser

java.lang.Object
  extended by de.jstacs.io.XMLParser

public class XMLParser
extends Object

Class for parsing standard data types and arrays in and out of an XML File. The methods with prefix append or add are for encoding, while methods with prefix extract are for decoding.

Author:
Jan Grau, Jens Keilwagen

Constructor Summary
XMLParser()
           
 
Method Summary
static void addTags(StringBuffer source, String tag)
          Frames the StringBuffer source with equal tags "< tag>" and "</tag >".
static void addTags(StringBuffer source, String startTag, String endTag)
          Frames the StringBuffer source with "< startTag>" and "</endTag >".
static void appendBoolean2ArrayWithTags(StringBuffer source, boolean[][] i, String tag)
          Appends an encoded two dimensional boolean array with equal tags to the StringBuffer source.
static void appendBoolean2ArrayWithTags(StringBuffer source, boolean[][] i, String startTag, String endTag)
          Appends an encoded two dimensional boolean array with start and end tag to the StringBuffer source.
static void appendBooleanArrayWithTags(StringBuffer source, boolean[] b, String tag)
          Appends an encoded boolean array with equal tags to the StringBuffer source.
static void appendBooleanArrayWithTags(StringBuffer source, boolean[] b, String startTag, String endTag)
          Appends an encoded boolean array with start and end tag to the StringBuffer source.
static void appendBooleanWithTags(StringBuffer source, boolean b, String tag)
          Appends a boolean value with equal tags to the StringBuffer source in the following way: "< tag>b</tag>".
static void appendBooleanWithTags(StringBuffer source, boolean b, String startTag, String endTag)
          Appends a boolean value with start and end tag to the StringBuffer source in the following way: "< startTag>b</endTag >".
static void appendByte2ArrayWithTags(StringBuffer source, byte[][] i, String tag)
          Appends an encoded two dimensional byte array with equal tags to the StringBuffer source.
static void appendByte2ArrayWithTags(StringBuffer source, byte[][] i, String startTag, String endTag)
          Appends an encoded two dimensional byte array with start and end tag to the StringBuffer source.
static void appendByteArrayWithTags(StringBuffer source, byte[] b, String tag)
          Appends an encoded byte array with equal tags to the StringBuffer source.
static void appendByteArrayWithTags(StringBuffer source, byte[] b, String startTag, String endTag)
          Appends an encoded byte array with start and end tag to the StringBuffer source.
static void appendByteWithTags(StringBuffer source, byte b, String tag)
          Appends a byte value with equal tags to the StringBuffer source in the following way: "< tag>b</tag>".
static void appendByteWithTags(StringBuffer source, byte b, String startTag, String endTag)
          Appends a byte value with start and end tag to the StringBuffer source in the following way: "< startTag>b</endTag >".
static void appendDouble2ArrayWithTags(StringBuffer source, double[][] d, String tag)
          Appends an encoded two dimensional double array with equal tags to the StringBuffer source.
static void appendDouble2ArrayWithTags(StringBuffer source, double[][] d, String startTag, String endTag)
          Appends an encoded two dimensional double array with start and end tag to the StringBuffer source.
static void appendDoubleArrayWithTags(StringBuffer source, double[] d, String tag)
          Appends an encoded double array with equal tags to the StringBuffer source.
static void appendDoubleArrayWithTags(StringBuffer source, double[] d, String startTag, String endTag)
          Appends an encoded double array with start and end tag to the StringBuffer source.
static void appendDoubleWithTags(StringBuffer source, double d, String startTag)
          Appends a double value with equal tags to the StringBuffer source in the following way: "< tag>d</tag>".
static void appendDoubleWithTags(StringBuffer source, double d, String startTag, String endTag)
          Appends a double value with start and end tag to the StringBuffer source in the following way: "< startTag>d</endTag >".
static
<T extends Enum<T>>
void
appendEnumWithTags(StringBuffer source, Enum<T> e, String tag)
          Appends an Enum object with equal tags to the StringBuffer source.
static
<T extends Enum<T>>
void
appendEnumWithTags(StringBuffer source, Enum<T> e, String startTag, String endTag)
          Appends an Enum object with start and end tag to the StringBuffer source.
static void appendInt2ArrayWithTags(StringBuffer source, int[][] i, String tag)
          Appends an encoded two dimensional int array with equal tags to the StringBuffer source.
static void appendInt2ArrayWithTags(StringBuffer source, int[][] i, String startTag, String endTag)
          Appends an encoded two dimensional int array with start and end tag to the StringBuffer source.
static void appendIntArrayWithTags(StringBuffer source, int[] i, String tag)
          Appends an encoded int array with equal tags to the StringBuffer source.
static void appendIntArrayWithTags(StringBuffer source, int[] i, String startTag, String endTag)
          Appends an encoded int array with start and end tag to the StringBuffer source.
static void appendIntWithTags(StringBuffer source, int i, String tag)
          Appends an int value with equal tags to the StringBuffer source in the following way: "< tag>i</tag>"
static void appendIntWithTags(StringBuffer source, int i, String startTag, String endTag)
          Appends an int value with start and end tag to the StringBuffer source in the following way: "< startTag>i</endTag >".
static void appendLongWithTags(StringBuffer source, long i, String tag)
          Appends a long value with equal tags to the StringBuffer source in the following way: "< tag>i</tag>".
static void appendLongWithTags(StringBuffer source, long i, String startTag, String endTag)
          Appends a long value with start and end tag to the StringBuffer source in the following way: "< startTag>i</endTag >".
static void appendStorable2ArrayWithTags(StringBuffer source, Storable[][] s, String tag)
          Appends an encoded two dimensional Storable array with equal tags to the StringBuffer source.
static void appendStorable2ArrayWithTags(StringBuffer source, Storable[][] s, String startTag, String endTag)
          Appends an encoded two dimensional Storable array with start and end tag to the StringBuffer source.
static void appendStorable3ArrayWithTags(StringBuffer source, Storable[][][] s, String tag)
          Appends an encoded three dimensional Storable array with equal tags to the StringBuffer source.
static void appendStorable3ArrayWithTags(StringBuffer source, Storable[][][] s, String startTag, String endTag)
          Appends an encoded three dimensional Storable array with start and end tag to the StringBuffer source.
static void appendStorableArrayWithTags(StringBuffer source, Storable[] s, String tag)
          Appends an encoded Storable array with equal tags to the StringBuffer source.
static void appendStorableArrayWithTags(StringBuffer source, Storable[] s, String startTag, String endTag)
          Appends an encoded Storable array with start and end tag to the StringBuffer source.
static void appendStorableOrNullWithTags(StringBuffer source, Storable s, String tag)
          Appends a Storable object or "null" with equal tags to the StringBuffer source.
static void appendStorableOrNullWithTags(StringBuffer source, Storable s, String startTag, String endTag)
          Appends a Storable object or "null" with start and end tag to the StringBuffer source.
static void appendStorableWithTags(StringBuffer source, Storable s, String startTag)
          Appends a Storable object with equal tags to the StringBuffer source.
static void appendStorableWithTags(StringBuffer source, Storable s, String startTag, String endTag)
          Appends a Storable object with start and end tag to the StringBuffer source.
static void appendString2ArrayWithTags(StringBuffer source, String[][] s, String tag)
          Appends an encoded two dimensional String array with equal tags to the StringBuffer source.
static void appendString2ArrayWithTags(StringBuffer source, String[][] s, String startTag, String endTag)
          Appends an encoded two dimensional String array with start and end tag to the StringBuffer source.
static void appendStringArrayWithTags(StringBuffer source, String[] s, String tag)
          Appends an encoded String array with equal tags to the StringBuffer source.
static void appendStringArrayWithTags(StringBuffer source, String[] s, String startTag, String endTag)
          Appends an encoded String array with start and end tag to the StringBuffer source.
static void appendStringWithTags(StringBuffer source, String s, String startTag)
          Appends a String with equal tags to the StringBuffer source in the following way: "<tag> s</tag >".
static void appendStringWithTags(StringBuffer source, String s, String startTag, String endTag)
          Appends a String with start and end tag to the StringBuffer source in the following way: "< startTag>s</endTag >".
protected static StringBuffer BooleanArrayWithTags(boolean[] b)
          Encodes a boolean array.
protected static StringBuffer ByteArrayWithTags(byte[] b)
          Encodes a byte array.
protected static StringBuffer DoubleArrayWithTags(double[] d)
          Encodes a double array.
static boolean[][] extractBoolean2ArrayForTag(StringBuffer source, String tag)
          Returns the value between equal start and end tags as a two dimensional boolean array.
static boolean[][] extractBoolean2ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a two dimensional boolean array.
static boolean[] extractBooleanArrayForTag(StringBuffer source, String tag)
          Returns the value between equal start and end tags as a boolean array.
static boolean[] extractBooleanArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a boolean array.
static boolean extractBooleanForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as boolean.
static boolean extractBooleanForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as boolean.
static byte[][] extractByte2ArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a two dimensional byte array.
static byte[][] extractByte2ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a two dimensional byte array.
static byte[] extractByteArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a byte array.
static byte[] extractByteArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a byte array.
static byte extractByteForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as byte.
static byte extractByteForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as byte.
static double[][] extractDouble2ArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a two dimensional double array.
static double[][] extractDouble2ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a two dimensional double array.
static double[] extractDoubleArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a double array.
static double[] extractDoubleArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a double array.
static double extractDoubleForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as double .
static double extractDoubleForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as double.
static
<T extends Enum<T>>
T
extractEnumForTag(StringBuffer source, String tag)
          Returns the enumeration between equal start and end tags as Enum.
static
<T extends Enum<T>>
T
extractEnumForTag(StringBuffer source, String startTag, String endTag)
          Returns the enumeration between start and end tag as Enum.
static StringBuffer extractForTag(StringBuffer source, String tag)
          Extracts the code between equal start and end tags and returns the substring between the tags as new StringBuffer.
static StringBuffer extractForTag(StringBuffer source, String startTag, String endTag)
          Extracts the code between start and end tag and returns the substring between the tags as new StringBuffer.
static int[][] extractInt2ArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a two dimensional int array.
static int[][] extractInt2ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a two dimensional int array.
static int[] extractIntArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as an int array.
static int[] extractIntArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as an int array.
static int extractIntForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as int.
static int extractIntForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as int.
static long extractLongForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as long.
static long extractLongForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as long.
static Storable[][] extractStorable2ArrayForTag(StringBuffer source, String tag)
          Returns the value between equal start and end tags as a two dimensional Storable array.
static Storable[][] extractStorable2ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a two dimensional Storable array.
static Storable[][][] extractStorable3ArrayForTag(StringBuffer source, String tag)
          Returns the value between equal start and end tags as a three dimensional Storable array.
static Storable[][][] extractStorable3ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a three dimensional Storable array.
static Storable[] extractStorableArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a Storable array.
static Storable[] extractStorableArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a Storable array.
static Storable extractStorableForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as Storable.
static Storable extractStorableForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as Storable.
static Storable extractStorableOrNullForTag(StringBuffer source, String tag)
          Returns the value between equal start and end tags as Storable or null.
static Storable extractStorableOrNullForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as Storable or null.
static String[][] extractString2ArrayForTag(StringBuffer source, String tag)
          Returns the value between equal start and end tags as a two dimensional String array.
static String[][] extractString2ArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a two dimensional String array.
static String[] extractStringArrayForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a String array.
static String[] extractStringArrayForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a String array.
static String extractStringForTag(StringBuffer source, String startTag)
          Returns the value between equal start and end tags as a String.
static String extractStringForTag(StringBuffer source, String startTag, String endTag)
          Returns the value between start and end tag as a String.
protected static StringBuffer IntArrayWithTags(int[] i)
          Encodes an int array.
protected static StringBuffer StorableArrayWithTags(Storable[] s)
          Encodes a Storable array.
protected static StringBuffer StringArrayWithTags(String[] s)
          Encodes a String array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLParser

public XMLParser()
Method Detail

extractForTag

public static StringBuffer extractForTag(StringBuffer source,
                                         String tag)
                                  throws NonParsableException
Extracts the code between equal start and end tags and returns the substring between the tags as new StringBuffer.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the substring shall be taken (start tag should be equal to end tag)
Returns:
the substring between the tags as StringBuffer
Throws:
NonParsableException - if the substring could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractForTag

public static StringBuffer extractForTag(StringBuffer source,
                                         String startTag,
                                         String endTag)
                                  throws NonParsableException
Extracts the code between start and end tag and returns the substring between the tags as new StringBuffer.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the substring between start and end tag as StringBuffer
Throws:
NonParsableException - if the substring could not be parsed

extractBooleanForTag

public static boolean extractBooleanForTag(StringBuffer source,
                                           String startTag)
                                    throws NonParsableException
Returns the value between equal start and end tags as boolean.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as boolean
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractBooleanForTag(StringBuffer, String, String)

extractBooleanForTag

public static boolean extractBooleanForTag(StringBuffer source,
                                           String startTag,
                                           String endTag)
                                    throws NonParsableException
Returns the value between start and end tag as boolean.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as boolean
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractByteForTag

public static byte extractByteForTag(StringBuffer source,
                                     String startTag)
                              throws NonParsableException
Returns the value between equal start and end tags as byte.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as byte
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractByteForTag(StringBuffer, String, String)

extractByteForTag

public static byte extractByteForTag(StringBuffer source,
                                     String startTag,
                                     String endTag)
                              throws NonParsableException
Returns the value between start and end tag as byte.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as byte
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractEnumForTag

public static <T extends Enum<T>> T extractEnumForTag(StringBuffer source,
                                                      String tag)
                                           throws NonParsableException
Returns the enumeration between equal start and end tags as Enum.

Type Parameters:
T - the type of the Enum objects
Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the enumeration shall be taken (start tag should be equal to end tag)
Returns:
the enumeration between the tags as Enum
Throws:
NonParsableException - if the enumeration could not be parsed
See Also:
extractEnumForTag(StringBuffer, String, String)

extractEnumForTag

public static <T extends Enum<T>> T extractEnumForTag(StringBuffer source,
                                                      String startTag,
                                                      String endTag)
                                           throws NonParsableException
Returns the enumeration between start and end tag as Enum.

Type Parameters:
T - the type of the Enum objects
Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the enumeration between start and end tag as Enum
Throws:
NonParsableException - if the enumeration could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractIntForTag

public static int extractIntForTag(StringBuffer source,
                                   String startTag)
                            throws NonParsableException
Returns the value between equal start and end tags as int.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as int
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractIntForTag(StringBuffer, String, String)

extractIntForTag

public static int extractIntForTag(StringBuffer source,
                                   String startTag,
                                   String endTag)
                            throws NonParsableException
Returns the value between start and end tag as int.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as int
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractLongForTag

public static long extractLongForTag(StringBuffer source,
                                     String startTag)
                              throws NonParsableException
Returns the value between equal start and end tags as long.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as long
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractLongForTag(StringBuffer, String, String)

extractLongForTag

public static long extractLongForTag(StringBuffer source,
                                     String startTag,
                                     String endTag)
                              throws NonParsableException
Returns the value between start and end tag as long.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as long
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractDoubleForTag

public static double extractDoubleForTag(StringBuffer source,
                                         String startTag)
                                  throws NonParsableException
Returns the value between equal start and end tags as double .

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as double
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractDoubleForTag(StringBuffer, String, String)

extractDoubleForTag

public static double extractDoubleForTag(StringBuffer source,
                                         String startTag,
                                         String endTag)
                                  throws NonParsableException
Returns the value between start and end tag as double.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as double
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractStorableForTag

public static Storable extractStorableForTag(StringBuffer source,
                                             String startTag)
                                      throws NonParsableException
Returns the value between equal start and end tags as Storable.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as Storable
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStorableForTag(StringBuffer, String, String)

extractStorableForTag

public static Storable extractStorableForTag(StringBuffer source,
                                             String startTag,
                                             String endTag)
                                      throws NonParsableException
Returns the value between start and end tag as Storable.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as Storable
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractStorableOrNullForTag

public static Storable extractStorableOrNullForTag(StringBuffer source,
                                                   String tag)
                                            throws NonParsableException
Returns the value between equal start and end tags as Storable or null.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as Storable or null
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStorableOrNullForTag(StringBuffer, String, String)

extractStorableOrNullForTag

public static Storable extractStorableOrNullForTag(StringBuffer source,
                                                   String startTag,
                                                   String endTag)
                                            throws NonParsableException
Returns the value between start and end tag as Storable or null.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as Storable or null
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractStringForTag

public static String extractStringForTag(StringBuffer source,
                                         String startTag)
                                  throws NonParsableException
Returns the value between equal start and end tags as a String.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a String
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStringForTag(StringBuffer, String, String)

extractStringForTag

public static String extractStringForTag(StringBuffer source,
                                         String startTag,
                                         String endTag)
                                  throws NonParsableException
Returns the value between start and end tag as a String.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a String
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String)

extractBooleanArrayForTag

public static boolean[] extractBooleanArrayForTag(StringBuffer source,
                                                  String tag)
                                           throws NonParsableException
Returns the value between equal start and end tags as a boolean array.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a boolean array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractBooleanArrayForTag(StringBuffer, String, String)

extractBooleanArrayForTag

public static boolean[] extractBooleanArrayForTag(StringBuffer source,
                                                  String startTag,
                                                  String endTag)
                                           throws NonParsableException
Returns the value between start and end tag as a boolean array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a boolean array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractBooleanForTag(StringBuffer, String, String)

extractByteArrayForTag

public static byte[] extractByteArrayForTag(StringBuffer source,
                                            String startTag)
                                     throws NonParsableException
Returns the value between equal start and end tags as a byte array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a byte array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractByteArrayForTag(StringBuffer, String, String)

extractByteArrayForTag

public static byte[] extractByteArrayForTag(StringBuffer source,
                                            String startTag,
                                            String endTag)
                                     throws NonParsableException
Returns the value between start and end tag as a byte array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a byte array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractByteForTag(StringBuffer, String, String)

extractIntArrayForTag

public static int[] extractIntArrayForTag(StringBuffer source,
                                          String startTag)
                                   throws NonParsableException
Returns the value between equal start and end tags as an int array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as an int array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractIntArrayForTag(StringBuffer, String, String)

extractIntArrayForTag

public static int[] extractIntArrayForTag(StringBuffer source,
                                          String startTag,
                                          String endTag)
                                   throws NonParsableException
Returns the value between start and end tag as an int array.

Parameters:
source - the source StringBuffer
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as an int array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractIntForTag(StringBuffer, String, String)

extractDoubleArrayForTag

public static double[] extractDoubleArrayForTag(StringBuffer source,
                                                String startTag)
                                         throws NonParsableException
Returns the value between equal start and end tags as a double array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a double array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractDoubleArrayForTag(StringBuffer, String, String)

extractDoubleArrayForTag

public static double[] extractDoubleArrayForTag(StringBuffer source,
                                                String startTag,
                                                String endTag)
                                         throws NonParsableException
Returns the value between start and end tag as a double array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a double array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractDoubleForTag(StringBuffer, String, String)

extractStorableArrayForTag

public static Storable[] extractStorableArrayForTag(StringBuffer source,
                                                    String startTag)
                                             throws NonParsableException
Returns the value between equal start and end tags as a Storable array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a Storable array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStorableArrayForTag(StringBuffer, String, String), ArrayHandler.cast(Object...)

extractStorableArrayForTag

public static Storable[] extractStorableArrayForTag(StringBuffer source,
                                                    String startTag,
                                                    String endTag)
                                             throws NonParsableException
Returns the value between start and end tag as a Storable array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a Storable array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractStorableForTag(StringBuffer, String, String), ArrayHandler.cast(Object...)

extractStringArrayForTag

public static String[] extractStringArrayForTag(StringBuffer source,
                                                String startTag)
                                         throws NonParsableException
Returns the value between equal start and end tags as a String array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a String array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStringArrayForTag(StringBuffer, String, String)

extractStringArrayForTag

public static String[] extractStringArrayForTag(StringBuffer source,
                                                String startTag,
                                                String endTag)
                                         throws NonParsableException
Returns the value between start and end tag as a String array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a String array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractStringForTag(StringBuffer, String, String)

extractStorable2ArrayForTag

public static Storable[][] extractStorable2ArrayForTag(StringBuffer source,
                                                       String tag)
                                                throws NonParsableException
Returns the value between equal start and end tags as a two dimensional Storable array.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a two dimensional Storable array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStorable2ArrayForTag(StringBuffer, String, String)

extractStorable2ArrayForTag

public static Storable[][] extractStorable2ArrayForTag(StringBuffer source,
                                                       String startTag,
                                                       String endTag)
                                                throws NonParsableException
Returns the value between start and end tag as a two dimensional Storable array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a two dimensional Storable array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractStorableArrayForTag(StringBuffer, String, String)

extractStorable3ArrayForTag

public static Storable[][][] extractStorable3ArrayForTag(StringBuffer source,
                                                         String tag)
                                                  throws NonParsableException
Returns the value between equal start and end tags as a three dimensional Storable array.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a three dimensional Storable array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractStorable3ArrayForTag(StringBuffer, String, String)

extractStorable3ArrayForTag

public static Storable[][][] extractStorable3ArrayForTag(StringBuffer source,
                                                         String startTag,
                                                         String endTag)
                                                  throws NonParsableException
Returns the value between start and end tag as a three dimensional Storable array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a three dimensional Storable array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractStorable2ArrayForTag(StringBuffer, String, String)

extractBoolean2ArrayForTag

public static boolean[][] extractBoolean2ArrayForTag(StringBuffer source,
                                                     String tag)
                                              throws NonParsableException
Returns the value between equal start and end tags as a two dimensional boolean array.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a two dimensional boolean array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractBoolean2ArrayForTag(StringBuffer, String, String)

extractBoolean2ArrayForTag

public static boolean[][] extractBoolean2ArrayForTag(StringBuffer source,
                                                     String startTag,
                                                     String endTag)
                                              throws NonParsableException
Returns the value between start and end tag as a two dimensional boolean array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a two dimensional boolean array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractBooleanArrayForTag(StringBuffer, String, String)

extractByte2ArrayForTag

public static byte[][] extractByte2ArrayForTag(StringBuffer source,
                                               String startTag)
                                        throws NonParsableException
Returns the value between equal start and end tags as a two dimensional byte array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a two dimensional byte array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractByte2ArrayForTag(StringBuffer, String, String)

extractByte2ArrayForTag

public static byte[][] extractByte2ArrayForTag(StringBuffer source,
                                               String startTag,
                                               String endTag)
                                        throws NonParsableException
Returns the value between start and end tag as a two dimensional byte array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a two dimensional byte array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractByteArrayForTag(StringBuffer, String, String)

extractInt2ArrayForTag

public static int[][] extractInt2ArrayForTag(StringBuffer source,
                                             String startTag)
                                      throws NonParsableException
Returns the value between equal start and end tags as a two dimensional int array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a two dimensional int array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractInt2ArrayForTag(StringBuffer, String, String)

extractInt2ArrayForTag

public static int[][] extractInt2ArrayForTag(StringBuffer source,
                                             String startTag,
                                             String endTag)
                                      throws NonParsableException
Returns the value between start and end tag as a two dimensional int array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a two dimensional int array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractIntArrayForTag(StringBuffer, String, String)

extractDouble2ArrayForTag

public static double[][] extractDouble2ArrayForTag(StringBuffer source,
                                                   String startTag)
                                            throws NonParsableException
Returns the value between equal start and end tags as a two dimensional double array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a two dimensional double array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractDouble2ArrayForTag(StringBuffer, String, String)

extractDouble2ArrayForTag

public static double[][] extractDouble2ArrayForTag(StringBuffer source,
                                                   String startTag,
                                                   String endTag)
                                            throws NonParsableException
Returns the value between start and end tag as a two dimensional double array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a two dimensional double array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractDoubleArrayForTag(StringBuffer, String, String)

extractString2ArrayForTag

public static String[][] extractString2ArrayForTag(StringBuffer source,
                                                   String tag)
                                            throws NonParsableException
Returns the value between equal start and end tags as a two dimensional String array.

Parameters:
source - the source StringBuffer that should be decoded from XML
tag - the tags between which the value shall be taken (start tag should be equal to end tag)
Returns:
the value between the tags as a two dimensional String array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractString2ArrayForTag(StringBuffer, String, String)

extractString2ArrayForTag

public static String[][] extractString2ArrayForTag(StringBuffer source,
                                                   String startTag,
                                                   String endTag)
                                            throws NonParsableException
Returns the value between start and end tag as a two dimensional String array.

Parameters:
source - the source StringBuffer that should be decoded from XML
startTag - the start tag
endTag - the end tag
Returns:
the value between start and end tag as a two dimensional String array
Throws:
NonParsableException - if the value could not be parsed
See Also:
extractForTag(StringBuffer, String, String), extractStringArrayForTag(StringBuffer, String, String)

addTags

public static void addTags(StringBuffer source,
                           String tag)
Frames the StringBuffer source with equal tags "< tag>" and "</tag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
tag - the tags by which the StringBuffer should be framed (start tag should be equal to end tag)
See Also:
addTags(StringBuffer, String, String)

addTags

public static void addTags(StringBuffer source,
                           String startTag,
                           String endTag)
Frames the StringBuffer source with "< startTag>" and "</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
startTag - the start tag
endTag - the end tag

appendBooleanWithTags

public static void appendBooleanWithTags(StringBuffer source,
                                         boolean b,
                                         String tag)
Appends a boolean value with equal tags to the StringBuffer source in the following way: "< tag>b</tag>".

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the value that should be framed by the tags and appended to the source
tag - the tags by which the value should be framed (start tag should be equal to end tag)
See Also:
appendBooleanWithTags(StringBuffer, boolean, String, String)

appendBooleanWithTags

public static void appendBooleanWithTags(StringBuffer source,
                                         boolean b,
                                         String startTag,
                                         String endTag)
Appends a boolean value with start and end tag to the StringBuffer source in the following way: "< startTag>b</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the value that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

appendByteWithTags

public static void appendByteWithTags(StringBuffer source,
                                      byte b,
                                      String tag)
Appends a byte value with equal tags to the StringBuffer source in the following way: "< tag>b</tag>".

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the value that should be framed by the tags and appended to the source
tag - the tags by which the value should be framed (start tag should be equal to end tag)
See Also:
appendByteWithTags(StringBuffer, byte, String, String)

appendByteWithTags

public static void appendByteWithTags(StringBuffer source,
                                      byte b,
                                      String startTag,
                                      String endTag)
Appends a byte value with start and end tag to the StringBuffer source in the following way: "< startTag>b</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the value that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

appendEnumWithTags

public static <T extends Enum<T>> void appendEnumWithTags(StringBuffer source,
                                                          Enum<T> e,
                                                          String tag)
Appends an Enum object with equal tags to the StringBuffer source.

Type Parameters:
T - the type of the Enum objects
Parameters:
source - the source StringBuffer that should be encoded in XML
e - the enumeration that should be framed by the tags and appended to the source
tag - the tags by which the enumeration should be framed (start tag should be equal to end tag)
See Also:
appendEnumWithTags(StringBuffer, Enum, String, String)

appendEnumWithTags

public static <T extends Enum<T>> void appendEnumWithTags(StringBuffer source,
                                                          Enum<T> e,
                                                          String startTag,
                                                          String endTag)
Appends an Enum object with start and end tag to the StringBuffer source.

Type Parameters:
T - the type of the Enum objects
Parameters:
source - the source StringBuffer that should be encoded in XML
e - the enumeration that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag
See Also:
appendStringWithTags(StringBuffer, String, String, String)

appendIntWithTags

public static void appendIntWithTags(StringBuffer source,
                                     int i,
                                     String tag)
Appends an int value with equal tags to the StringBuffer source in the following way: "< tag>i</tag>"

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the value that should be framed by the tags and appended to the source
tag - the tags by which the value should be framed (start tag should be equal to end tag)
See Also:
appendIntWithTags(StringBuffer, int, String, String)

appendIntWithTags

public static void appendIntWithTags(StringBuffer source,
                                     int i,
                                     String startTag,
                                     String endTag)
Appends an int value with start and end tag to the StringBuffer source in the following way: "< startTag>i</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the value that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

appendLongWithTags

public static void appendLongWithTags(StringBuffer source,
                                      long i,
                                      String tag)
Appends a long value with equal tags to the StringBuffer source in the following way: "< tag>i</tag>".

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the value that should be framed by the tags and appended to the source
tag - the tags by which the value should be framed (start tag should be equal to end tag)
See Also:
appendLongWithTags(StringBuffer, long, String, String)

appendLongWithTags

public static void appendLongWithTags(StringBuffer source,
                                      long i,
                                      String startTag,
                                      String endTag)
Appends a long value with start and end tag to the StringBuffer source in the following way: "< startTag>i</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the value that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

appendDoubleWithTags

public static void appendDoubleWithTags(StringBuffer source,
                                        double d,
                                        String startTag)
Appends a double value with equal tags to the StringBuffer source in the following way: "< tag>d</tag>".

Parameters:
source - the source StringBuffer that should be encoded in XML
d - the value that should be framed by the tags and appended to the source
startTag - the tags by which the value should be framed (start tag should be equal to end tag)
See Also:
appendDoubleWithTags(StringBuffer, double, String, String)

appendDoubleWithTags

public static void appendDoubleWithTags(StringBuffer source,
                                        double d,
                                        String startTag,
                                        String endTag)
Appends a double value with start and end tag to the StringBuffer source in the following way: "< startTag>d</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
d - the value that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

appendStorableWithTags

public static void appendStorableWithTags(StringBuffer source,
                                          Storable s,
                                          String startTag)
Appends a Storable object with equal tags to the StringBuffer source.

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the object that should be framed by the tags and appended to the source
startTag - the tags by which the object should be framed (start tag should be equal to end tag)
See Also:
appendStorableWithTags(StringBuffer, Storable, String, String)

appendStorableWithTags

public static void appendStorableWithTags(StringBuffer source,
                                          Storable s,
                                          String startTag,
                                          String endTag)
Appends a Storable object with start and end tag to the StringBuffer source.

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the object that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

appendStorableOrNullWithTags

public static void appendStorableOrNullWithTags(StringBuffer source,
                                                Storable s,
                                                String tag)
Appends a Storable object or "null" with equal tags to the StringBuffer source.

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the object that should be framed by the tags and appended to the source, if null then "null" framed by the tags is appended to the source
tag - the tags by which the object or "null" should be framed (start tag should be equal to end tag)
See Also:
appendStorableOrNullWithTags(StringBuffer, Storable, String, String)

appendStorableOrNullWithTags

public static void appendStorableOrNullWithTags(StringBuffer source,
                                                Storable s,
                                                String startTag,
                                                String endTag)
Appends a Storable object or "null" with start and end tag to the StringBuffer source.

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the object that should be framed by start and end tag and appended to the source, if null then "null" framed by start and end tag is appended to the source
startTag - the start tag
endTag - the end tag

appendStringWithTags

public static void appendStringWithTags(StringBuffer source,
                                        String s,
                                        String startTag)
Appends a String with equal tags to the StringBuffer source in the following way: "<tag> s</tag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the String that should be framed by the tags and appended to the source
startTag - the tags by which the String should be framed (start tag should be equal to end tag)
See Also:
appendStringWithTags(StringBuffer, String, String, String)

appendStringWithTags

public static void appendStringWithTags(StringBuffer source,
                                        String s,
                                        String startTag,
                                        String endTag)
Appends a String with start and end tag to the StringBuffer source in the following way: "< startTag>s</endTag >".

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the value that should be framed by start and end tag and appended to the source
startTag - the start tag
endTag - the end tag

ByteArrayWithTags

protected static StringBuffer ByteArrayWithTags(byte[] b)
Encodes a byte array. The encoding is the following way:
<length>b.length</length>
<pos val="0">b[0]</pos>
<pos val="1">b[1]</pos>
...
It is necessary to include such an encoded array in tags or another array.

Parameters:
b - the array that should be encoded
Returns:
a StringBuffer representing the encoded array
See Also:
appendIntWithTags(StringBuffer, int, String), appendByteWithTags(StringBuffer, byte, String, String)

IntArrayWithTags

protected static StringBuffer IntArrayWithTags(int[] i)
Encodes an int array. The encoding is like in ByteArrayWithTags(byte[]).

Parameters:
i - the array that should be encoded
Returns:
a StringBuffer representing the encoded array
See Also:
ByteArrayWithTags(byte[]), appendIntWithTags(StringBuffer, int, String), appendIntWithTags(StringBuffer, int, String, String)

DoubleArrayWithTags

protected static StringBuffer DoubleArrayWithTags(double[] d)
Encodes a double array. The encoding is like in ByteArrayWithTags(byte[]).

Parameters:
d - the array that should be encoded
Returns:
a StringBuffer representing the encoded array
See Also:
ByteArrayWithTags(byte[]), appendIntWithTags(StringBuffer, int, String), appendDoubleWithTags(StringBuffer, double, String, String)

BooleanArrayWithTags

protected static StringBuffer BooleanArrayWithTags(boolean[] b)
Encodes a boolean array. The encoding is like in ByteArrayWithTags(byte[]).

Parameters:
b - the array that should be encoded
Returns:
a StringBuffer representing the encoded array
See Also:
ByteArrayWithTags(byte[]), appendIntWithTags(StringBuffer, int, String), appendBooleanWithTags(StringBuffer, boolean, String, String)

StringArrayWithTags

protected static StringBuffer StringArrayWithTags(String[] s)
Encodes a String array. The encoding is like in ByteArrayWithTags(byte[]).

Parameters:
s - the array that should be encoded
Returns:
a StringBuffer representing the encoded array
See Also:
ByteArrayWithTags(byte[]), appendIntWithTags(StringBuffer, int, String), appendStringWithTags(StringBuffer, String, String, String)

StorableArrayWithTags

protected static StringBuffer StorableArrayWithTags(Storable[] s)
Encodes a Storable array. The encoding is like in ByteArrayWithTags(byte[]).

Parameters:
s - the Storable object that should be encoded
Returns:
a StringBuffer representing the encoded Storable object
See Also:
ByteArrayWithTags(byte[]), appendIntWithTags(StringBuffer, int, String), appendStorableWithTags(StringBuffer, Storable, String, String)

appendBooleanArrayWithTags

public static void appendBooleanArrayWithTags(StringBuffer source,
                                              boolean[] b,
                                              String tag)
Appends an encoded boolean array with equal tags to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded array should be framed (start tag should be equal to end tag)
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), appendBooleanArrayWithTags(StringBuffer, boolean[], String, String)

appendBooleanArrayWithTags

public static void appendBooleanArrayWithTags(StringBuffer source,
                                              boolean[] b,
                                              String startTag,
                                              String endTag)
Appends an encoded boolean array with start and end tag to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), BooleanArrayWithTags(boolean[]), addTags(StringBuffer, String, String)

appendByteArrayWithTags

public static void appendByteArrayWithTags(StringBuffer source,
                                           byte[] b,
                                           String tag)
Appends an encoded byte array with equal tags to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded array should be framed (start tag should be equal to end tag)
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String)

appendByteArrayWithTags

public static void appendByteArrayWithTags(StringBuffer source,
                                           byte[] b,
                                           String startTag,
                                           String endTag)
Appends an encoded byte array with start and end tag to the StringBuffer source. The encoding is this way:
<startTag> <length>b.length</length>
<pos val="0">b[0]</pos>
<pos val="1">b[1]</pos>
...
</endTag>.

Parameters:
source - the source StringBuffer that should be encoded in XML
b - the array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
ByteArrayWithTags(byte[]), addTags(StringBuffer, String, String)

appendIntArrayWithTags

public static void appendIntArrayWithTags(StringBuffer source,
                                          int[] i,
                                          String tag)
Appends an encoded int array with equal tags to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded array should be framed (start tag should be equal to end tag)
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), appendIntArrayWithTags(StringBuffer, int[], String, String)

appendIntArrayWithTags

public static void appendIntArrayWithTags(StringBuffer source,
                                          int[] i,
                                          String startTag,
                                          String endTag)
Appends an encoded int array with start and end tag to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), IntArrayWithTags(int[]), addTags(StringBuffer, String, String)

appendDoubleArrayWithTags

public static void appendDoubleArrayWithTags(StringBuffer source,
                                             double[] d,
                                             String tag)
Appends an encoded double array with equal tags to the StringBuffer source. The encoding is like in like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
d - the array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded array should be framed (start tag should be equal to end tag)
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), appendDoubleArrayWithTags(StringBuffer, double[], String, String)

appendDoubleArrayWithTags

public static void appendDoubleArrayWithTags(StringBuffer source,
                                             double[] d,
                                             String startTag,
                                             String endTag)
Appends an encoded double array with start and end tag to the StringBuffer source. The encoding is like in like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
d - the array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), DoubleArrayWithTags(double[]), addTags(StringBuffer, String, String)

appendStorableArrayWithTags

public static void appendStorableArrayWithTags(StringBuffer source,
                                               Storable[] s,
                                               String tag)
Appends an encoded Storable array with equal tags to the StringBuffer source. The encoding is like in like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the Storable array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded Storable array should be framed (start tag should be equal to end tag)
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), appendStorableArrayWithTags(StringBuffer, Storable[], String, String)

appendStorableArrayWithTags

public static void appendStorableArrayWithTags(StringBuffer source,
                                               Storable[] s,
                                               String startTag,
                                               String endTag)
Appends an encoded Storable array with start and end tag to the StringBuffer source. The encoding is like in like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the Storable array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), StorableArrayWithTags(Storable[]), addTags(StringBuffer, String, String)

appendStringArrayWithTags

public static void appendStringArrayWithTags(StringBuffer source,
                                             String[] s,
                                             String tag)
Appends an encoded String array with equal tags to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded array should be framed (start tag should be equal to end tag)
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), appendStringArrayWithTags(StringBuffer, String[], String, String)

appendStringArrayWithTags

public static void appendStringArrayWithTags(StringBuffer source,
                                             String[] s,
                                             String startTag,
                                             String endTag)
Appends an encoded String array with start and end tag to the StringBuffer source. The encoding is like in appendByteArrayWithTags(StringBuffer, byte[], String, String).

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByteArrayWithTags(StringBuffer, byte[], String, String), StringArrayWithTags(String[]), addTags(StringBuffer, String, String)

appendBoolean2ArrayWithTags

public static void appendBoolean2ArrayWithTags(StringBuffer source,
                                               boolean[][] i,
                                               String tag)
Appends an encoded two dimensional boolean array with equal tags to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the two dimensional array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded two dimensional array should be framed (start tag should be equal to end tag)
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendBoolean2ArrayWithTags(StringBuffer, boolean[][], String, String)

appendBoolean2ArrayWithTags

public static void appendBoolean2ArrayWithTags(StringBuffer source,
                                               boolean[][] i,
                                               String startTag,
                                               String endTag)
Appends an encoded two dimensional boolean array with start and end tag to the StringBuffer source. The encoding is is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the two dimensional array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendIntWithTags(StringBuffer, int, String), BooleanArrayWithTags(boolean[]), addTags(StringBuffer, String, String)

appendByte2ArrayWithTags

public static void appendByte2ArrayWithTags(StringBuffer source,
                                            byte[][] i,
                                            String tag)
Appends an encoded two dimensional byte array with equal tags to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the two dimensional array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded two dimensional array should be framed (start tag should be equal to end tag)
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String)

appendByte2ArrayWithTags

public static void appendByte2ArrayWithTags(StringBuffer source,
                                            byte[][] i,
                                            String startTag,
                                            String endTag)
Appends an encoded two dimensional byte array with start and end tag to the StringBuffer source. The encoding is the following way:
<startTag> <length>i.length</length>
<pos val="0"> <length>i[0].length</length>
<pos val="0">i[0][0]</pos>
<pos val="1">i[0][1]</pos>
...
</pos>
<pos val="1"> <length>i[1].length</length>
...
</pos>
...
</endTag>.

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the two dimensional array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendIntWithTags(StringBuffer, int, String), ByteArrayWithTags(byte[]), addTags(StringBuffer, String, String)

appendInt2ArrayWithTags

public static void appendInt2ArrayWithTags(StringBuffer source,
                                           int[][] i,
                                           String tag)
Appends an encoded two dimensional int array with equal tags to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the two dimensional array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded two dimensional array should be framed (start tag should be equal to end tag)
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendInt2ArrayWithTags(StringBuffer, int[][], String, String)

appendInt2ArrayWithTags

public static void appendInt2ArrayWithTags(StringBuffer source,
                                           int[][] i,
                                           String startTag,
                                           String endTag)
Appends an encoded two dimensional int array with start and end tag to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
i - the two dimensional array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendIntWithTags(StringBuffer, int, String), IntArrayWithTags(int[]), addTags(StringBuffer, String, String)

appendDouble2ArrayWithTags

public static void appendDouble2ArrayWithTags(StringBuffer source,
                                              double[][] d,
                                              String tag)
Appends an encoded two dimensional double array with equal tags to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
d - the two dimensional array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded two dimensional array should be framed (start tag should be equal to end tag)
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendDouble2ArrayWithTags(StringBuffer, double[][], String, String)

appendDouble2ArrayWithTags

public static void appendDouble2ArrayWithTags(StringBuffer source,
                                              double[][] d,
                                              String startTag,
                                              String endTag)
Appends an encoded two dimensional double array with start and end tag to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
d - the two dimensional array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendIntWithTags(StringBuffer, int, String), DoubleArrayWithTags(double[]), addTags(StringBuffer, String, String)

appendStorable2ArrayWithTags

public static void appendStorable2ArrayWithTags(StringBuffer source,
                                                Storable[][] s,
                                                String tag)
Appends an encoded two dimensional Storable array with equal tags to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String)

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the two dimensional Storable array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded two dimensional Storable array should be framed (start tag should be equal to end tag)
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendStorable2ArrayWithTags(StringBuffer, Storable[][], String, String)

appendStorable2ArrayWithTags

public static void appendStorable2ArrayWithTags(StringBuffer source,
                                                Storable[][] s,
                                                String startTag,
                                                String endTag)
Appends an encoded two dimensional Storable array with start and end tag to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String)

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the two dimensional Storable array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendIntWithTags(StringBuffer, int, String), StorableArrayWithTags(Storable[]), addTags(StringBuffer, String, String)

appendStorable3ArrayWithTags

public static void appendStorable3ArrayWithTags(StringBuffer source,
                                                Storable[][][] s,
                                                String tag)
Appends an encoded three dimensional Storable array with equal tags to the StringBuffer source.

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the three dimensional Storable array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded three dimensional Storable array should be framed (start tag should be equal to end tag)
See Also:
appendStorable3ArrayWithTags(StringBuffer, Storable[][][], String, String)

appendStorable3ArrayWithTags

public static void appendStorable3ArrayWithTags(StringBuffer source,
                                                Storable[][][] s,
                                                String startTag,
                                                String endTag)
Appends an encoded three dimensional Storable array with start and end tag to the StringBuffer source.

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the three dimensional Storable array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendIntWithTags(StringBuffer, int, String), appendStorable2ArrayWithTags(StringBuffer, Storable[][], String, String), addTags(StringBuffer, String, String)

appendString2ArrayWithTags

public static void appendString2ArrayWithTags(StringBuffer source,
                                              String[][] s,
                                              String tag)
Appends an encoded two dimensional String array with equal tags to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the two dimensional array that should be encoded and appended to the source framed by the tags
tag - the tags by which the encoded two dimensional array should be framed (start tag should be equal to end tag)
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendString2ArrayWithTags(StringBuffer, String[][], String, String)

appendString2ArrayWithTags

public static void appendString2ArrayWithTags(StringBuffer source,
                                              String[][] s,
                                              String startTag,
                                              String endTag)
Appends an encoded two dimensional String array with start and end tag to the StringBuffer source. The encoding is like in appendByte2ArrayWithTags(StringBuffer, byte[][], String, String) .

Parameters:
source - the source StringBuffer that should be encoded in XML
s - the two dimensional array that should be encoded and appended to the source framed by start and end tag
startTag - the start tag
endTag - the end tag
See Also:
appendByte2ArrayWithTags(StringBuffer, byte[][], String, String), appendIntWithTags(StringBuffer, int, String), StringArrayWithTags(String[]), addTags(StringBuffer, String, String)