org.openmms.util
Class Convert

java.lang.Object
  |
  +--org.openmms.util.Convert

public class Convert
extends java.lang.Object

Title: Convert

Description: String, bytes and hex converting operations

Copyright: Copyright (c) 2003 OpenMMS.org


Constructor Summary
Convert()
           
 
Method Summary
static java.lang.String bytesToHex(byte[] inBytes)
          Converts a byte array to a hex string.
static java.lang.String bytesToString(byte[] inBytes)
          Converts a text byte array to a text string.
static java.lang.String charToHex(char[] inBytes)
          Converts a char array to a hex string.
static java.lang.String hexToTxtString(java.lang.String s)
          Converts a hex string to a text string.
static java.lang.String intToHex(int nValue)
          Converts an int to hex string.
static java.lang.String longToHex(long nValue)
          Converts an int to hex string.
static byte[] txtStringToBytes(java.lang.String sInString)
          Converts a text string to a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Convert

public Convert()
Method Detail

txtStringToBytes

public static byte[] txtStringToBytes(java.lang.String sInString)
Converts a text string to a byte array.

Parameters:
sInString -
Returns:
byte array

hexToTxtString

public static java.lang.String hexToTxtString(java.lang.String s)
Converts a hex string to a text string.

Parameters:
s -
Returns:
text string.

bytesToString

public static java.lang.String bytesToString(byte[] inBytes)
Converts a text byte array to a text string.

Parameters:
inBytes -
Returns:
text string

bytesToHex

public static java.lang.String bytesToHex(byte[] inBytes)
Converts a byte array to a hex string.

Parameters:
inBytes -
Returns:
hex string

charToHex

public static java.lang.String charToHex(char[] inBytes)
Converts a char array to a hex string.

Parameters:
inBytes -
Returns:
hex string

intToHex

public static java.lang.String intToHex(int nValue)
Converts an int to hex string.

Parameters:
nValue - value to convert
Returns:
hex string

longToHex

public static java.lang.String longToHex(long nValue)
Converts an int to hex string.

Parameters:
nValue - value to convert
Returns:
hex string