org.fopps.model
Class Filesize

java.lang.Object
  |
  +--org.fopps.model.Filesize
All Implemented Interfaces:
Enum

public final class Filesize
extends java.lang.Object
implements Enum

More convenient file size display


Field Summary
static int BYTE
           
static int GBYTE
           
static int INVALID
           
static int KBYTE
           
static int MAXVALUE
           
static int MBYTE
           
static java.lang.String[] SIZE_UNITS
           
static int TBYTE
           
 
Constructor Summary
Filesize(long pFileSizeinByte)
          Constructor for Filesize.
 
Method Summary
 java.lang.Object getDefault()
          Returns the default value of the enumeration
 java.lang.Object[] getInstances()
          Returns all possible instances of the enumeration
 double getSize()
          Returns the size.
 long getSizeInBytes()
          Returns the size in bytes.
 byte getUnit()
          Returns the unit.
 int getValue()
          Returns the unit.
 void setSize(long pSizeInBytes)
          Sets the size.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID

public static final int INVALID
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

KBYTE

public static final int KBYTE
See Also:
Constant Field Values

MBYTE

public static final int MBYTE
See Also:
Constant Field Values

GBYTE

public static final int GBYTE
See Also:
Constant Field Values

TBYTE

public static final int TBYTE
See Also:
Constant Field Values

MAXVALUE

public static final int MAXVALUE
See Also:
Constant Field Values

SIZE_UNITS

public static final java.lang.String[] SIZE_UNITS
Constructor Detail

Filesize

public Filesize(long pFileSizeinByte)
Constructor for Filesize.

Method Detail

getValue

public int getValue()
Returns the unit.

Specified by:
getValue in interface Enum

getDefault

public java.lang.Object getDefault()
Returns the default value of the enumeration

Specified by:
getDefault in interface Enum

getInstances

public java.lang.Object[] getInstances()
Description copied from interface: Enum
Returns all possible instances of the enumeration

Specified by:
getInstances in interface Enum
See Also:
Enum.getInstances()

toString

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

getSize

public double getSize()
Returns the size.

Returns:
double

getUnit

public byte getUnit()
Returns the unit. This value corresponds to the array position in SIZE_UNITS

Returns:
Index of unit

setSize

public void setSize(long pSizeInBytes)
Sets the size.


getSizeInBytes

public long getSizeInBytes()
Returns the size in bytes.

Returns:
long


Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.