code: public static String[] toStringArray(final String objname, final DbAttribute[] attributes, final int mode) {
          final int nb_attr = attributes.length;
  
          // Copy object name and nb attrib to String array
          final ArrayList<String> list = new ArrayList<String>();
          list.add(objname);
          list.add(Integer.toString(nb_attr));
          for (DbAttribute attribute : attributes) {
              // Copy Attrib name and nb prop to String array
              list.add(attribute.name);
              list.add("" + attribute.size());
              for (int j=0 ; j<attribute.size() ; j++) {
                  // Copy data to String array
                  list.add(attribute.get_property_name(j));
                  final String[] values = attribute.get_value(j);
                  if (mode != 1) {
                      list.add("" + values.length);
                  }
                  list.addAll(Arrays.asList(values));
              }
          }
          // alloacte a String array
          final String[] array = new String[list.size()];
          for (int i = 0; i < list.size(); i++) {
              array[i] = list.get(i);
          }
          return array;
      }
docs: ==========================================================================