75
78
return new Timestamp(System.currentTimeMillis());
81
public static int countNulls(ResultSet input) throws SQLException
84
int top = input.getMetaData().getColumnCount();
85
for(int idx = 1; idx <= top; ++idx)
94
public static int countNulls(Integer[] intArray) throws SQLException
97
int top = intArray.length;
98
for(int idx = 0; idx < top; ++idx)
100
if(intArray[idx] == null)
106
public static byte print(byte value)
108
log("byte " + value);
112
public static byte[] print(byte[] byteArray)
114
StringBuffer buf = new StringBuffer();
115
int top = byteArray.length;
116
buf.append("byte[] of size " + top);
120
buf.append(byteArray[0]);
121
for(int idx = 1; idx < top; ++idx)
124
buf.append(byteArray[idx]);
132
public static short print(short value)
134
log("short " + value);
138
public static short[] print(short[] shortArray)
140
StringBuffer buf = new StringBuffer();
141
int top = shortArray.length;
142
buf.append("short[] of size " + top);
146
buf.append(shortArray[0]);
147
for(int idx = 1; idx < top; ++idx)
150
buf.append(shortArray[idx]);
158
public static int print(int value)
164
public static int[] print(int[] intArray)
166
StringBuffer buf = new StringBuffer();
167
int top = intArray.length;
168
buf.append("int[] of size " + top);
172
buf.append(intArray[0]);
173
for(int idx = 1; idx < top; ++idx)
176
buf.append(intArray[idx]);
184
public static long print(long value)
186
log("long " + value);
190
public static long[] print(long[] longArray)
192
StringBuffer buf = new StringBuffer();
193
int top = longArray.length;
194
buf.append("long[] of size " + top);
198
buf.append(longArray[0]);
199
for(int idx = 1; idx < top; ++idx)
202
buf.append(longArray[idx]);
210
public static float print(float value)
212
log("float " + value);
216
public static float[] print(float[] floatArray)
218
StringBuffer buf = new StringBuffer();
219
int top = floatArray.length;
220
buf.append("float[] of size " + top);
224
buf.append(floatArray[0]);
225
for(int idx = 1; idx < top; ++idx)
228
buf.append(floatArray[idx]);
236
public static double print(double value)
238
log("double " + value);
242
public static double[] print(double[] doubleArray)
244
StringBuffer buf = new StringBuffer();
245
int top = doubleArray.length;
246
buf.append("double[] of size " + top);
250
buf.append(doubleArray[0]);
251
for(int idx = 1; idx < top; ++idx)
254
buf.append(doubleArray[idx]);
262
public static Integer[] print(Integer[] intArray)
264
StringBuffer buf = new StringBuffer();
265
int top = intArray.length;
266
buf.append("Integer[] of size " + top);
270
buf.append(intArray[0]);
271
for(int idx = 1; idx < top; ++idx)
274
buf.append(intArray[idx]);
78
282
public static void print(Date time)
80
284
DateFormat p = DateFormat.getDateInstance(DateFormat.FULL);
285
log("Local Date is " + p.format(time));
81
286
p.setTimeZone(TimeZone.getTimeZone("UTC"));
82
log("Date is " + p.format(time));
287
log("UTC Date is " + p.format(time));
288
log("TZ = " + TimeZone.getDefault().getDisplayName());
85
291
public static void print(Time time)
87
DateFormat p = DateFormat.getTimeInstance(DateFormat.FULL);
293
DateFormat p = new SimpleDateFormat("HH:mm:ss z Z");
294
log("Local Time is " + p.format(time));
88
295
p.setTimeZone(TimeZone.getTimeZone("UTC"));
89
log("Time is " + p.format(time));
296
log("UTC Time is " + p.format(time));
297
log("TZ = " + TimeZone.getDefault().getDisplayName());
92
300
public static void print(Timestamp time)
94
302
DateFormat p = DateFormat.getDateTimeInstance(
95
303
DateFormat.FULL, DateFormat.FULL);
304
log("Local Timestamp is " + p.format(time));
96
305
p.setTimeZone(TimeZone.getTimeZone("UTC"));
97
log("Timestamp is " + p.format(time));
306
log("UTC Timestamp is " + p.format(time));
307
log("TZ = " + TimeZone.getDefault().getDisplayName());