src/solaris/classes/sun/print/IPPPrintService.java

Print this page

        

@@ -1902,13 +1902,12 @@
                 }
                 return (HashMap[])respList.toArray(
                                   new HashMap[respList.size()]);
             } else {
                 debug_println(debugPrefix+
-                              "readIPPResponse client error, IPP status code-"
-                                   +Integer.toHexString(response[2])+" & "
-                                   +Integer.toHexString(response[3]));
+                          "readIPPResponse client error, IPP status code: 0x"+
+                          toHex(response[2]) + toHex(response[3]));
                 return null;
             }
 
         } catch (java.io.IOException e) {
             debug_println(debugPrefix+"readIPPResponse: "+e);

@@ -1917,10 +1916,14 @@
             }
             return null;
         }
     }
 
+    private static String toHex(byte v) {
+        String s = Integer.toHexString(v&0xff);
+        return (s.length() == 2) ? s :  "0"+s;
+    }
 
     public String toString() {
         return "IPP Printer : " + getName();
     }