void show() { // 打印任务执行的结果
   String result;
   if (connectFinish != 0) result = Long.toString(connectFinish - connectStart) + "ms";
   else if (failure != null) result = failure.toString();
   else result = "Timed out";
   System.out.println(address + " : " + result);
   shown = true;
 }
Beispiel #2
0
 /**
  * Creates a byte array representation from the specified long value, using Java's standard
  * method.
  *
  * @param integer value to be converted
  * @return byte array
  */
 public static byte[] token(final long integer) {
   return integer >= Integer.MIN_VALUE && integer <= Integer.MAX_VALUE
       ? token((int) integer)
       : token(Long.toString(integer));
 }