TiBlob Class Reference
Inherits from | TiProxy : NSObject |
Declared in | TiBlob.h |
Tasks
-
width
Returns width if the blob object is an image, 0 otherwise.
property -
height
Returns height if the blob object is an image, 0 otherwise.
property -
text
Return a textual representation of the blob.
property -
length
Returns the data length.
property -
size
Return the data size.
property -
– initWithImage:
Initialize the blob with an image.
-
– initWithData:mimetype:
Initialize the blob with data.
-
– initWithFile:
Initialize the blob with contents of a file.
-
– setData:
Initialises blob with data.
-
– setImage:
Initializes blob with image.
-
– setMimeType:type:
Sets the blob type.
-
– type
Returns the blob type.
-
– mimeType
Returns the blob mime type.
-
– data
Returns the blob raw data.
-
– image
Returns the blob image.
-
– path
Returns the blob file path.
-
– nativePath
Returns the blob native path (Android compatibility).
-
– writeTo:error:
Tells the blob to write its data to a file.
Properties
height
Returns height if the blob object is an image, 0 otherwise.
@property (nonatomic, readonly) NSInteger height
Declared In
TiBlob.h
length
Returns the data length.
@property (nonatomic, readonly) NSNumber *length
Declared In
TiBlob.h
size
Return the data size.
@property (nonatomic, readonly) NSInteger size
Discussion
For file, data returns the size in bytes, for image, returns the width x height.
Declared In
TiBlob.h
Instance Methods
image
Returns the blob image.
- (UIImage *)image
Return Value
The image or nil if the blob data cannot represent an image.
Declared In
TiBlob.h
initWithData:mimetype:
Initialize the blob with data.
- (id)initWithData:(NSData *)data_ mimetype:(NSString *)mimetype_
Parameters
- data_
The raw data.
- mimetype_
The data mime type.
Declared In
TiBlob.h
initWithFile:
Initialize the blob with contents of a file.
- (id)initWithFile:(NSString *)path
Parameters
- path
The path to the file.
Declared In
TiBlob.h
initWithImage:
Initialize the blob with an image.
- (id)initWithImage:(UIImage *)image
Parameters
- image
The image
Declared In
TiBlob.h
mimeType
Returns the blob mime type.
- (NSString *)mimeType
Return Value
The mime type string.
Declared In
TiBlob.h
nativePath
Returns the blob native path (Android compatibility).
- (id)nativePath
Return Value
The blob native path.
Declared In
TiBlob.h
path
Returns the blob file path.
- (NSString *)path
Return Value
The file path.
Declared In
TiBlob.h
setData:
Initialises blob with data.
- (void)setData:(NSData *)data
Parameters
- data
Th data to set.
Declared In
TiBlob.h
setImage:
Initializes blob with image.
- (void)setImage:(UIImage *)image
Parameters
- image
The image to set.
Declared In
TiBlob.h