Class ByteUtils

java.lang.Object
org.apache.wiki.util.ByteUtils

public class ByteUtils
extends java.lang.Object
A collection of static byte utility methods.
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String byte2hex​(byte b)
    byte to hex conversion.
    static java.lang.String bytes2hex​(byte[] bytes)
    byte[] array to hex conversion.
    static int hexToBin​(char c)
    Converts a single hex character into its integer equivalent.
    static byte[] parseHexBinary​(java.lang.String hex)
    Parses a hexadecimal string into its corresponding bytes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • bytes2hex

      public static java.lang.String bytes2hex​(byte[] bytes)
      byte[] array to hex conversion. Note that this provides no delimiters; the bytes are simply concatenated.
    • byte2hex

      public static java.lang.String byte2hex​(byte b)
      byte to hex conversion.
    • parseHexBinary

      public static byte[] parseHexBinary​(java.lang.String hex)
      Parses a hexadecimal string into its corresponding bytes.
    • hexToBin

      public static int hexToBin​(char c)
      Converts a single hex character into its integer equivalent.