com.partnersoft.data
Class ByteSize

java.lang.Object
  extended by com.partnersoft.data.ByteSize
All Implemented Interfaces:
Immutable

public class ByteSize
extends java.lang.Object
implements Immutable

An immutable measure that allows you to specify a byte size in a variety of ways and get it back in whatever units you want.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Method Summary
static ByteSize forBytes(double bytes)
           
static ByteSize forBytes(long bytes)
           
static ByteSize forGigabytes(double gb)
           
static ByteSize forGigabytes(int gb)
           
static ByteSize forKilobytes(double kb)
           
static ByteSize forKilobytes(long kb)
           
static ByteSize forMegabytes(double mb)
           
static ByteSize forMegabytes(long mb)
           
static ByteSize forTerabytes(double tb)
           
static ByteSize forTerabytes(int tb)
           
 long getBytes()
           
 double getGigabytes()
           
 double getKilobytes()
           
 double getMegabytes()
           
 double getTerabytes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forBytes

public static ByteSize forBytes(long bytes)

forBytes

public static ByteSize forBytes(double bytes)

forKilobytes

public static ByteSize forKilobytes(long kb)

forKilobytes

public static ByteSize forKilobytes(double kb)

forMegabytes

public static ByteSize forMegabytes(long mb)

forMegabytes

public static ByteSize forMegabytes(double mb)

forGigabytes

public static ByteSize forGigabytes(int gb)

forGigabytes

public static ByteSize forGigabytes(double gb)

forTerabytes

public static ByteSize forTerabytes(int tb)

forTerabytes

public static ByteSize forTerabytes(double tb)

getBytes

public long getBytes()

getKilobytes

public double getKilobytes()

getMegabytes

public double getMegabytes()

getGigabytes

public double getGigabytes()

getTerabytes

public double getTerabytes()