at.jku.fim.datalinksimulation.utils
Class ConversionUtils

java.lang.Object
  extended by 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
           
 
Constructor Summary
ConversionUtils()
           
 
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
 

Field Detail

hexTable

private static final java.lang.String hexTable
See Also:
Constant Field Values

pows

private static final int[] pows
Constructor Detail

ConversionUtils

public ConversionUtils()
Method Detail

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)