Author: markt
Date: Tue Sep 16 13:54:57 2014
New Revision: 1625288
URL: http://svn.apache.org/r1625288
Log:
Fix formatting
Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java?rev=1625288&r1=1625287&r2=1625288&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/HexUtils.java Tue Sep 16
13:54:57 2014
@@ -23,13 +23,11 @@ package org.apache.tomcat.util.buf;
*
* @author Craig R. McClanahan
*/
-
public final class HexUtils {
// -------------------------------------------------------------- Constants
-
/**
* Table for HEX to DEC byte translation.
*/
@@ -55,10 +53,10 @@ public final class HexUtils {
*/
private static final char[] hex = "0123456789abcdef".toCharArray();
- // --------------------------------------------------------- Static Methods
+ // --------------------------------------------------------- Static Methods
- public static int getDec(int index){
+ public static int getDec(int index) {
// Fast for correct values, slower for incorrect ones
try {
return DEC[index - '0'];
@@ -67,19 +65,18 @@ public final class HexUtils {
}
}
- public static byte getHex(int index){
+ public static byte getHex(int index) {
return HEX[index];
}
- public static String toHexString(byte[] bytes)
- {
- if(null == bytes) {
+ public static String toHexString(byte[] bytes) {
+ if (null == bytes) {
return null;
}
StringBuilder sb = new StringBuilder(bytes.length << 1);
- for(int i=0; i<bytes.length; ++i) {
+ for(int i = 0; i < bytes.length; ++i) {
sb.append(hex[(bytes[i] & 0xf0) >> 4])
.append(hex[(bytes[i] & 0x0f)])
;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]