Class ApachePatch.Hex

java.lang.Object
com.easypost.utils.ApachePatch.Hex
Enclosing class:
ApachePatch

public static class ApachePatch.Hex extends Object
This class was lifted and modified from common-codec:common-codec version 1.15, namespace org.apache.commons.codec.binary.Hex, released under the Apache License 2.0.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Hex()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static char[]
    encodeHex(byte[] data)
    Encode a byte array into a hex char array.
    static char[]
    encodeHex(byte[] data, boolean toLowerCase)
    Encode a byte array into a hex char array.
    protected static char[]
    encodeHex(byte[] data, char[] toDigits)
    Encode a byte array into a hex char array.

    Methods inherited from class java.lang.Object

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

    • Hex

      public Hex()
  • Method Details

    • encodeHex

      public static char[] encodeHex(byte[] data)
      Encode a byte array into a hex char array.
      Parameters:
      data - the byte array to encode
      Returns:
      the hex encoded char array
    • encodeHex

      public static char[] encodeHex(byte[] data, boolean toLowerCase)
      Encode a byte array into a hex char array.
      Parameters:
      data - the byte array to encode
      toLowerCase - true converts to lowercase, false to uppercase
      Returns:
      the hex encoded char array
    • encodeHex

      protected static char[] encodeHex(byte[] data, char[] toDigits)
      Encode a byte array into a hex char array.
      Parameters:
      data - the byte array to encode
      toDigits - map of elements to convert to digits
      Returns:
      the hex encoded char array