X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fcommons%2Fdata%2FHexConverter.java;h=55f264bffed9577f33e821a1de4954604563d0af;hb=443c6a564efa9f5868fd81c0db23a480cbe3cab4;hp=a8532adc7408ed2017065f1551853c28363002ca;hpb=b34ba4499cfbca09bc794a810e460bf1c86dcd34;p=svjatoslav_commons.git diff --git a/src/main/java/eu/svjatoslav/commons/data/HexConverter.java b/src/main/java/eu/svjatoslav/commons/data/HexConverter.java index a8532ad..55f264b 100755 --- a/src/main/java/eu/svjatoslav/commons/data/HexConverter.java +++ b/src/main/java/eu/svjatoslav/commons/data/HexConverter.java @@ -1,7 +1,7 @@ /* * Svjatoslav Commons - shared library of common functionality. - * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * + * Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License * or later as published by the Free Software Foundation. @@ -11,20 +11,20 @@ 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(); + } }