Documentation

ETByteSizeFormatter class documentation

ETByteSizeFormatter : NSFormatter

Formatter subclass to convert numbers expressed in bytes to a human-readable format.

AuthorsGenerated by qmathe
Declared inETByteSizeFormatter.h

Overview

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.


Default

- (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.