ETByteSizeFormatter class documentation

Authors

Quentin Mathe (quentin.mathe@gmail.com)
Formatter subclass to convert numbers expressed in bytes to a human-readable format.

Copyright: (C) 2010 Quentin Mathe

Software documentation for the ETByteSizeFormatter class

ETByteSizeFormatter : NSFormatter

Declared in:
ETByteSizeFormatter.h

@group String Manipulation and Formatting

ETByteSizeFormatter supports to format NSNumber objects up the terabyte unit as detailed in -stringForObjectValue: .

ETByteSizeFormatter is now deprecated in favor of NSByteCountFormatter, we still support it on Mac OS X for backward compatibility with 10.6 and 10.7.

Method summary

stringForObjectValue: 

- (NSString*) stringForObjectValue: (id)anObject;

Converts the given byte size (must be a NSNumber object) into a human-readable string expressed in:

B
bytes
KB
kilobytes
MB
megabytes
GB
gigabytes
TB
terabytes

No digits are displayed after the decimal point for B and KB, one digit for MB, two digits for GB and three digits for TB.