at.jku.fim.datalinksimulation.utils
Class ConversionUtils
java.lang.Object
at.jku.fim.datalinksimulation.utils.ConversionUtils
public class ConversionUtils
- extends java.lang.Object
Title: OSI Simulation Framework
Copyright: (c) 2004-05
Company: FIM@JKU, www.fim.uni-linz.ac.at
- Version:
- $Id: ConversionUtils.java,v 1.1 2005/10/27 13:10:11 aputzinger Exp $
- Author:
- Andreas Putzinger
Field Summary |
private static java.lang.String |
hexTable
|
private static int[] |
pows
|
Method Summary |
static java.lang.String |
byteToHex(int data)
Converts a value between 0 and 255 to it's hex representation |
static java.util.BitSet |
createBitSet(int[] rd)
|
static int[] |
createFrame(java.util.BitSet bs,
int arraySize)
|
static java.lang.String |
getStringRepresentation(java.util.BitSet bs)
|
static java.lang.String |
stringToHex(java.lang.String data)
Converts a given String to a sequence of hexadecimal expressions; only works fine
for characters between 0 and 255 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hexTable
private static final java.lang.String hexTable
- See Also:
- Constant Field Values
pows
private static final int[] pows
ConversionUtils
public ConversionUtils()
stringToHex
public static java.lang.String stringToHex(java.lang.String data)
- Converts a given String to a sequence of hexadecimal expressions; only works fine
for characters between 0 and 255
- Parameters:
data
- String to convert; if data == null, an empty String is returned
- Returns:
- Hexadecimal representation of String
byteToHex
public static java.lang.String byteToHex(int data)
- Converts a value between 0 and 255 to it's hex representation
- Parameters:
data
- value to convert
- Returns:
- hex representation
createBitSet
public static java.util.BitSet createBitSet(int[] rd)
createFrame
public static int[] createFrame(java.util.BitSet bs,
int arraySize)
getStringRepresentation
public static java.lang.String getStringRepresentation(java.util.BitSet bs)