Code cleanup and formatting. Migrated to java 1.8.
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / data / HexConverter.java
old mode 100644 (file)
new mode 100755 (executable)
index e2f2007..a10472f
@@ -1,30 +1,30 @@
 /*
  * Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
  * 
  * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation.
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
  */
 
 package eu.svjatoslav.commons.data;
 
 public class HexConverter {
 
-       static final String hexCharacters = "0123456789ABCDEF";
+    static final String hexCharacters = "0123456789ABCDEF";
 
-       public static String byteArrayToHex(final byte[] bytes) {
+    public static String byteArrayToHex(final byte[] bytes) {
 
-               if (bytes == null)
-                       return null;
+        if (bytes == null)
+            return null;
 
-               final StringBuilder result = new StringBuilder(2 * bytes.length);
+        final StringBuilder result = new StringBuilder(2 * bytes.length);
 
-               for (final byte b : bytes)
-                       result.append(hexCharacters.charAt((b & 0xF0) >> 4)).append(
-                                       hexCharacters.charAt((b & 0x0F)));
+        for (final byte b : bytes)
+            result.append(hexCharacters.charAt((b & 0xF0) >> 4)).append(
+                    hexCharacters.charAt((b & 0x0F)));
 
-               return result.toString();
-       }
+        return result.toString();
+    }
 
 }