com.jguild.jrpm.io.datatype
public final class RPMUtil extends Object
Version: $Id: RPMUtil.java,v 1.3 2005/11/11 08:27:40 mkuss Exp $
Method Summary | |
---|---|
static String | byteArrayToHexString(byte[] barray)
Method to get a beautyfied representation of an byte array as a hex
string. |
static String | byteToHexString(byte b)
Method to get a beautyfied representation of a byte as a hex string. |
static String | cArrayToString(byte[] data, int offset)
Method to convert a null terminated C string into a java string using the
DEFAULT_ENCODING
|
static String | cArrayToString(byte[] data, int offset, String enc)
Method to convert a null terminated C string into a java string using the
defined encoding
|
Parameters: barray An byte array that should be converted to a hex string
Returns: The hex string
Parameters: b A byte that should be converted to a hex string
Returns: The hex string
Parameters: data An array of bytes containing a C string offset An offset from which to start to read the string from the data array
Returns: A java string representig a null terminated C string
Throws: UnsupportedEncodingException if the encoding is not supported
Parameters: data An array of bytes containing a C string offset An offset from which to start to read the string from the data array enc A encoding as defined in java.lang.String
Returns: A java string representig a null terminated C string
Throws: UnsupportedEncodingException if the encoding is not supported