com.pega.pegarules.pub.util
Class JavaUtils

java.lang.Object
  extended by com.pega.pegarules.pub.util.JavaUtils

public class JavaUtils
extends java.lang.Object

Helpful functions for Java.

Version:
$Revision: 14515 $ $Date: 2011-09-23 11:35:56 -0400 (Fri, 23 Sep 2011) $
Author:
Jim Gajnak

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Constructor Summary
JavaUtils()
           
 
Method Summary
static int byteArray2Int(byte[] in)
          Convert the first 4 bytes of array to equivalent integer.
static int byteArray2Int(byte[] in, int offset)
           
static java.lang.String getClassLocation(java.lang.String aClassName)
          Return the location of a class given its name,
static byte[] int2ByteArray(int in)
          Convert an integer to a 4 byte array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Constructor Detail

JavaUtils

public JavaUtils()
Method Detail

getClassLocation

public static java.lang.String getClassLocation(java.lang.String aClassName)
Return the location of a class given its name,

Parameters:
aClassName - The name of the class to be looked up
Returns:
A string path to the class, or null if it cannot be resolved.

int2ByteArray

public static byte[] int2ByteArray(int in)
Convert an integer to a 4 byte array.

Parameters:
in - integer to convert
Returns:
4 byte array holding the integer

byteArray2Int

public static int byteArray2Int(byte[] in)
Convert the first 4 bytes of array to equivalent integer.

Parameters:
in - byte array for input
Returns:
corresponding integer
Throws:
java.lang.IllegalArgumentException - if array not at least 4 bytes.

byteArray2Int

public static int byteArray2Int(byte[] in,
                                int offset)


Copyright © 2012 Pegasystems Inc. All Rights Reserved.