net.sf.fmj.utility
Class ArrayUtility

java.lang.Object
  extended by net.sf.fmj.utility.ArrayUtility

public class ArrayUtility
extends java.lang.Object

Class used to convert array types (int[] -> bytep[], bytep[] -> int[] etc.). Methods in this class does not check if there is any data loss occuring, they simply cast all the elements into output type.

Author:
Martin Harvan

Constructor Summary
ArrayUtility()
           
 
Method Summary
static int[] byteArrayToIntArray(byte[] b)
           
static byte[] copyOfRange(byte[] inputData, int from, int to)
           
static int[] copyOfRange(int[] inputData, int from, int to)
           
static byte[] intArrayToByteArray(int[] b)
           
static byte[] shortArrayToByteArray(short[] b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtility

public ArrayUtility()
Method Detail

byteArrayToIntArray

public static int[] byteArrayToIntArray(byte[] b)

intArrayToByteArray

public static byte[] intArrayToByteArray(int[] b)

shortArrayToByteArray

public static byte[] shortArrayToByteArray(short[] b)

copyOfRange

public static byte[] copyOfRange(byte[] inputData,
                                 int from,
                                 int to)

copyOfRange

public static int[] copyOfRange(int[] inputData,
                                int from,
                                int to)