org.apache.xerces.impl.dv.util
Class HexBin
java.lang.Object
org.apache.xerces.impl.dv.util.HexBin
public final class HexBin
- extends Object
format validation
This class encodes/decodes hexadecimal data
- Version:
- $Id: HexBin.java,v 1.13 2004/10/14 15:20:18 mrglavas Exp $
- Author:
- Jeffrey Rodriguez
Method Summary |
static byte[] |
decode(String encoded)
Decode hex string to a byte array |
static String |
encode(byte[] binaryData)
Encode a byte array to hex string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HexBin
public HexBin()
encode
public static String encode(byte[] binaryData)
- Encode a byte array to hex string
- Parameters:
binaryData
- array of byte to encode
- Returns:
- return encoded string
decode
public static byte[] decode(String encoded)
- Decode hex string to a byte array
- Parameters:
encoded
- encoded string
- Returns:
- return array of byte to encode
Copyright © 2011 Apache Software Foundation. All Rights Reserved.