de.fh_mannheim.mm.dms.framework
Class FileSize

java.lang.Object
  extended byde.fh_mannheim.mm.dms.framework.FileSize

public class FileSize
extends java.lang.Object

This class converts a filesize into a string.

Version:
$Revision: 1.5 $
Author:
Jan Löffler, mail@jlsoft.de

Field Summary
static int BYTES
          Public declarations of filesizes
static int GIGABYTE
           
static int KILOBYTE
           
static int MEGABYTE
           
static int TERABYTE
           
 
Constructor Summary
FileSize(double dFilesize)
          Constructor.
FileSize(int nFilesize)
          Constructor.
 
Method Summary
 double getBytes()
          Converts the size to bytes.
 double getGb()
          Converts the size to kilobytes.
 double getKb()
          Converts the size to kilobytes.
 double getMb()
          Converts the size to kilobytes.
 java.lang.String toString()
          Get size of file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BYTES

public static final int BYTES
Public declarations of filesizes

See Also:
Constant Field Values

KILOBYTE

public static final int KILOBYTE
See Also:
Constant Field Values

MEGABYTE

public static final int MEGABYTE
See Also:
Constant Field Values

GIGABYTE

public static final int GIGABYTE
See Also:
Constant Field Values

TERABYTE

public static final int TERABYTE
See Also:
Constant Field Values
Constructor Detail

FileSize

public FileSize(double dFilesize)
Constructor.

Parameters:
dFilesize - Pre-selected filesize

FileSize

public FileSize(int nFilesize)
Constructor.

Parameters:
nFilesize - Pre-selected filesize
Method Detail

getBytes

public double getBytes()
Converts the size to bytes.

Returns:
size in byte

getGb

public double getGb()
Converts the size to kilobytes.

Returns:
size in kilobyte

getKb

public double getKb()
Converts the size to kilobytes.

Returns:
size in kilobyte

getMb

public double getMb()
Converts the size to kilobytes.

Returns:
size in kilobyte

toString

public java.lang.String toString()
Get size of file

Returns:
size text