コード例 #1
0
 /** Helper printing function */
 private static String byteArrayInString(byte[] data) {
   StringBuilder result = new StringBuilder();
   for (Byte b : data) {
     result.append(b.intValue()).append(" ");
   }
   return result.toString();
 }
コード例 #2
0
 /** Returns a string representation of the object. */
 @Override
 public String toString() {
   if (colType == null) {
     return null;
   }
   StringBuilder result = new StringBuilder();
   for (int i = 0; i < colType.length; i++) {
     result.append("Column ").append(i).append(":");
     if (colValue[i] != null) {
       result.append(
           colType[i] == BYTEA.getOID() ? byteArrayInString((byte[]) colValue[i]) : colValue[i]);
     }
     result.append("\n");
   }
   return result.toString();
 }