com.enderak.procol.common.util
Class ProColUtils

java.lang.Object
  |
  +--com.enderak.procol.common.util.ProColUtils

public class ProColUtils
extends java.lang.Object

Some misc utility functions used by ProCol

Author:
Justin Dieters

Constructor Summary
ProColUtils()
           
 
Method Summary
static java.util.Vector dataStringToVector(byte[] dataIn)
          Converts a byte array representing a String into a vector, split based on newlines
static byte[] intToByteArray(int intIn)
          Breaks an int down into a array of bytes
static java.lang.String vectorToString(java.util.Vector vectorIn)
          Converts a vector into a newline-delimited String list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProColUtils

public ProColUtils()
Method Detail

dataStringToVector

public static java.util.Vector dataStringToVector(byte[] dataIn)
Converts a byte array representing a String into a vector, split based on newlines

Parameters:
dataIn - The byte array
Returns:
The Vector

vectorToString

public static java.lang.String vectorToString(java.util.Vector vectorIn)
Converts a vector into a newline-delimited String list

Parameters:
vectorIn - The vector to convert
Returns:
The string, with vector elements delimited by newlines

intToByteArray

public static byte[] intToByteArray(int intIn)
Breaks an int down into a array of bytes

Parameters:
intIn - The int
Returns:
The array of bytes ( byte[4] )