directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r359001 - /directory/asn1/trunk/codec/src/main/java/org/apache/asn1/codec/util/StringUtils.java
Date Sun, 25 Dec 2005 19:22:44 GMT
Author: elecharny
Date: Sun Dec 25 11:22:40 2005
New Revision: 359001

URL: http://svn.apache.org/viewcvs?rev=359001&view=rev
Log:
Added a dumpHex method

Modified:
    directory/asn1/trunk/codec/src/main/java/org/apache/asn1/codec/util/StringUtils.java

Modified: directory/asn1/trunk/codec/src/main/java/org/apache/asn1/codec/util/StringUtils.java
URL: http://svn.apache.org/viewcvs/directory/asn1/trunk/codec/src/main/java/org/apache/asn1/codec/util/StringUtils.java?rev=359001&r1=359000&r2=359001&view=diff
==============================================================================
--- directory/asn1/trunk/codec/src/main/java/org/apache/asn1/codec/util/StringUtils.java (original)
+++ directory/asn1/trunk/codec/src/main/java/org/apache/asn1/codec/util/StringUtils.java Sun
Dec 25 11:22:40 2005
@@ -153,6 +153,17 @@
     }
     
     /**
+     * Helper function that returns a char from an hex
+     * 
+     * @param octet The hex to dump
+     * @return A char representation of the hex
+     */
+    public static char dumpHex( byte hex )
+    {
+        return (char)HEX_CHAR[hex & 0x000F];
+    }
+    
+    /**
      * Helper function that dump an array of bytes in hex form
      * 
      * @param buffer The bytes array to dump



Mime
View raw message