Back to Fresco

Hex

docs/javadoc/reference/com/facebook/common/util/Hex.html

3.6.011.8 KB
Original Source

Fresco

|

|

Packages | Classes

Classes

Enums

Exceptions

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public class

Hex

extends Object

| java.lang.Object | | ↳ | com.facebook.common.util.Hex |

Class Overview

Basic hex operations: from byte array to string and vice versa.

TODO: move to the framework and consider implementing as native code.

Summary

Public Constructors
Public Methods
static String
Convert an int [0-255] to a hexadecimal string representation.
static byte[]
Quickly converts a hexadecimal string to a byte array.
static String
Quickly converts a byte array to a hexadecimal string representation.
static byte[]

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Constructors

public Hex()

Public Methods

public static String byte2Hex(int value)

Convert an int [0-255] to a hexadecimal string representation.

Parameters

| value | int value. |

public static byte[] decodeHex(String hexString)

Quickly converts a hexadecimal string to a byte array.

public static String encodeHex(byte[] array, boolean zeroTerminated)

Quickly converts a byte array to a hexadecimal string representation.

Parameters

| array | byte array, possibly zero-terminated. |

public static byte[] hexStringToByteArray(String s)

+Generated by Doclava. +