de.cscc.crypto.util
Class IntegerUtil

java.lang.Object
  extended byde.cscc.crypto.util.IntegerUtil

public final class IntegerUtil
extends Object

IntegerUtil Class. Class that hold only static methods to convert ints and int arrays to Strings. These Strings holds the hex or binary representation of the converted ints or int arrays. This class can't be instance, because its constructor is private.

Version:
$Revision: 1.3 $
Author:
Uwe Günther

Method Summary
static String toBin(int in)
          Converts byte to binary representation.
static String toBin(int[] in)
          Converts int[] to binary representation.
static byte[] toByteArray(int in)
          Converts int to byte[4]
static String toHex(int in)
          Converts int to hex representation.
static String toHex(int[] in)
          Converts int[] to hex representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toBin

public static String toBin(int in)
Converts byte to binary representation.

Parameters:
in - int that will be converted.
Returns:
String with hex representation of in.

toBin

public static String toBin(int[] in)
Converts int[] to binary representation.

Parameters:
in - int[] that will be converted.
Returns:
String with hex representation of in.

toHex

public static String toHex(int in)
Converts int to hex representation.

Parameters:
in - int that will be converted.
Returns:
String with hex representation of in.

toHex

public static String toHex(int[] in)
Converts int[] to hex representation.

Parameters:
in - int[] that will be converted.
Returns:
String with hex representation of in.

toByteArray

public static byte[] toByteArray(int in)
Converts int to byte[4]

Parameters:
in - int that should be converted to byte[4].
Returns:
byte array that holds the int in.


Copyright © 2001, 2002 by Uwe GŁnther. See the COPYING file for more details. Browse the source as HTML.