com.notuvy.file
Class FileSize

java.lang.Object
  extended by com.notuvy.file.FileSize

public class FileSize
extends Object

Decompose the total bytes to larger denominations.

Author:
murali

Field Summary
static int HALF_KILO
           
static int KILO
           
protected static org.apache.log4j.Logger LOG
           
static int MEGA
           
 
Constructor Summary
FileSize(File pFile)
           
FileSize(long pTotal)
           
 
Method Summary
static long bytesToMb(long pBytes)
           
protected  LinkedList getParts()
           
 long getTotal()
           
static long mbToBytes(long pBytes)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

KILO

public static final int KILO
See Also:
Constant Field Values

HALF_KILO

public static final int HALF_KILO
See Also:
Constant Field Values

MEGA

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

FileSize

public FileSize(long pTotal)

FileSize

public FileSize(File pFile)
Method Detail

mbToBytes

public static long mbToBytes(long pBytes)

bytesToMb

public static long bytesToMb(long pBytes)

getTotal

public long getTotal()

getParts

protected LinkedList getParts()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.