cds.util
Class Longs

java.lang.Object
  extended bycds.util.Longs

public class Longs
extends java.lang.Object

Static methods dealing with int variables

Version:
1.0 July 2003, 1.1 Feb 2004 MW: add nbBytes()
Author:
Marc Wenger/CDS

Constructor Summary
Longs()
           
 
Method Summary
static int nbBytes(long num)
          Computes the number of bytes needed by the long (from 1 to 8)
static int nbdigits(long num)
          Computes the number of decimal digits of an integer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Longs

public Longs()
Method Detail

nbdigits

public static int nbdigits(long num)
Computes the number of decimal digits of an integer

Parameters:
num - integer
Returns:
the number of decimal digits

nbBytes

public static int nbBytes(long num)
Computes the number of bytes needed by the long (from 1 to 8)

Parameters:
num - long
Returns:
the number of bytes