cct.tools.filebrowser
Class FileSize

java.lang.Object
  extended by java.lang.Number
      extended by cct.tools.filebrowser.FileSize
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class FileSize
extends java.lang.Number
implements java.io.Serializable, java.lang.Comparable

Title:

Description:

Handles file size as unsigned integer 64 it's a redesign of a UnsignedInteger64 class from the sshtools

Copyright: Copyright (c) 2006

Company: ANU

See Also:
Serialized Form

Field Summary
static java.math.BigInteger MAX_VALUE
           
static java.math.BigInteger MIN_VALUE
           
 
Constructor Summary
FileSize(java.math.BigInteger input)
          Creates a new FileSize object.
FileSize(byte[] bval)
          Creates a new FileSize object.
FileSize(java.lang.String sval)
          Creates a new FileSize object.
 
Method Summary
static FileSize add(FileSize x, FileSize y)
           
static FileSize add(FileSize x, int y)
           
 java.math.BigInteger bigIntValue()
           
 int compareTo(java.lang.Object val)
           
 double doubleValue()
           
 boolean equals(java.lang.Object o)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final java.math.BigInteger MAX_VALUE

MIN_VALUE

public static final java.math.BigInteger MIN_VALUE
Constructor Detail

FileSize

public FileSize(java.lang.String sval)
         throws java.lang.NumberFormatException
Creates a new FileSize object.

Parameters:
sval -
Throws:
java.lang.NumberFormatException

FileSize

public FileSize(byte[] bval)
         throws java.lang.NumberFormatException
Creates a new FileSize object.

Parameters:
bval -
Throws:
java.lang.NumberFormatException

FileSize

public FileSize(java.math.BigInteger input)
Creates a new FileSize object.

Parameters:
input -
Throws:
java.lang.NumberFormatException
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:

bigIntValue

public java.math.BigInteger bigIntValue()
Returns:

intValue

public int intValue()
Specified by:
intValue in class java.lang.Number
Returns:

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number
Returns:

doubleValue

public double doubleValue()
Specified by:
doubleValue in class java.lang.Number
Returns:

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number
Returns:

compareTo

public int compareTo(java.lang.Object val)
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
val -
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:

add

public static FileSize add(FileSize x,
                           FileSize y)
Parameters:
x -
y -
Returns:

add

public static FileSize add(FileSize x,
                           int y)
Parameters:
x -
y -
Returns: