クラス org.objectweb.cjdbc.common.util.ReadWrite

すべてのメンバ一覧

説明

This class defines reading and writing convenient methods

作者:
Nicolas Modrzyk
バージョン:
1.0

ReadWrite.java37 行で定義されています。

Static Public メソッド

String write (Hashtable table, boolean prefix)
String write (ArrayList list, String listName, boolean writeCountKey)


メソッド

String org.objectweb.cjdbc.common.util.ReadWrite.write ArrayList  list,
String  listName,
boolean  writeCountKey
[static]
 

Write the content of the ArrayList in a readable format

引数:
list the list to get the values from
listName give the prefix names for values
writeCountKey should we write the count keys
戻り値:
String conversion for the list content
ReadWrite.java95 行で定義されています。
00097 { 00098 if (list == null) 00099 return ""; 00100 StringBuffer buffer = new StringBuffer(); 00101 int size = list.size(); 00102 if (writeCountKey) 00103 buffer.append(listName + ".items.count=" + size 00104 + System.getProperty("line.separator")); 00105 for (int i = 0; i < size; i++) 00106 buffer.append(listName + "." + i + "=" + list.get(i) 00107 + System.getProperty("line.separator")); 00108 return buffer.toString(); 00109 }

String org.objectweb.cjdbc.common.util.ReadWrite.write Hashtable  table,
boolean  prefix
[static]
 

Write the content of the Hashtable in a readable format

引数:
table the hashtable to get keys and values from
prefix prefix some values with tabs
戻り値:
String conversion for the table content
ReadWrite.java47 行で定義されています。
00048 { 00049 if (table == null) 00050 return ""; 00051 StringBuffer buffer = new StringBuffer(); 00052 Enumeration e = table.keys(); 00053 Object o; 00054 while (e.hasMoreElements()) 00055 { 00056 o = e.nextElement(); 00057 if (o.toString().indexOf(".path") != -1) 00058 { 00059 // This is a class path, make it look nice 00060 buffer.append(o + " = " + System.getProperty("line.separator")); 00061 String substring = (String) table.get(o); 00062 int index; 00063 while (true) 00064 { 00065 index = substring.indexOf(':'); 00066 if (index == -1) 00067 break; 00068 if (prefix) 00069 buffer.append("\t\t"); 00070 buffer.append(substring.substring(0, index) 00071 + System.getProperty("line.separator")); 00072 substring = substring.substring(index + 1); 00073 } 00074 if (prefix) 00075 buffer.append("\t\t"); 00076 buffer.append(substring + System.getProperty("line.separator")); 00077 } 00078 else 00079 { 00080 buffer.append(o + " = " + table.get(o) 00081 + System.getProperty("line.separator")); 00082 } 00083 } 00084 return buffer.toString(); 00085 }


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:19 2004に生成されました。 doxygen 1.3.8