Bit is represents a bit value.
Bit can be used for a different kind of formatting of a bit value.
It allows to access the value as bit, kilo-bit, mega-bit, giga-bit, tera-bit,
byte, kilo-byte, mega-byte, giga-byte and tera-byte.
static public DEFAULT_FLOATING_POINTS:Numberpublic function setFloatingPoints(fp:Number):BitSets the used amount of values after the comma.
This method does not change anything if fp is smaller than 0
or not passed-in.
fp | amount of characters after the floating point |
the current instance
public function getKiloBit(Void):NumberReturns the value in kilobit.
value in kilobit
public function getKiloBytes(Void):NumberReturns the value in kilobytes.
value in kilobytes
public function getMegaBit(Void):NumberReturns the value in megabit.
value in megabit
public function getMegaBytes(Void):NumberReturns the value in megabytes.
value in megabytes
public function getGigaBit(Void):NumberReturns the value in gigabit.
value in gigabit
public function getGigaBytes(Void):NumberReturns the value in gigabytes.
value in gigabytes
public function getTeraBit(Void):NumberReturns the value in terabit.
value in terabit
public function getTeraBytes(Void):NumberReturns the value in terabytes.
value in terabytes
public function toString():StringExtended toString method for a well formatted bit value.
This method uses the next matching size and adds the matching Shortname for it.
Examples:
new BitFormat(1).toString(); // 1b
new BitFormat(1234).toString(); // 1.21Kb
new BitFormat(15002344).toString(); // 14.31Mb
bits in the next matching size with the matchin unit
toString() in org.as2lib.core.BasicInterface
toString() in org.as2lib.core.BasicClass