unc.cdva.utils
Class Util

java.lang.Object
  extended by unc.cdva.utils.Util

public class Util
extends java.lang.Object

Utility class

Author:
Guillaume Conte

Constructor Summary
Util()
           
 
Method Summary
protected static java.lang.String generateLogString(java.lang.String line)
          Generate log line
static java.io.InputStream getStream(java.lang.String file)
          Try to open a file.
static long intToLong(int integer)
          Converts an integer into the corresponding long value.
static void printLog(java.lang.String line)
          Display line of text + time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

intToLong

public static long intToLong(int integer)
Converts an integer into the corresponding long value.

Parameters:
integer - The integer to convert.
Returns:
A long value that has the same numerical value as the int parameter.

printLog

public static void printLog(java.lang.String line)
Display line of text + time

Parameters:
line - text to display

generateLogString

protected static java.lang.String generateLogString(java.lang.String line)
Generate log line

Parameters:
line - text to display

getStream

public static java.io.InputStream getStream(java.lang.String file)
Try to open a file. If the file doesn't exists, return null and display a message

Parameters:
file - path of the file
Returns:
input stream ready to be read of null