Couchbase Lite
Objective-C API for iOS and Mac OS
CBLBlob.h
Go to the documentation of this file.
1 //
2 // CBLBlob.h
3 // CouchbaseLite
4 //
5 // Created by Jim Borden on 2017/01/17.
6 // Copyright © 2017 Couchbase. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
11 NS_ASSUME_NONNULL_BEGIN
12 
13 
23 @interface CBLBlob : NSObject
24 
30 - (nullable instancetype) initWithContentType: (NSString *)contentType
31  data: (NSData *) data
32  error: (NSError**)error;
33 
39 - (nullable instancetype) initWithContentType: (NSString *)contentType
40  contentStream: (NSInputStream *)stream
41  error: (NSError**)error;
42 
48 - (nullable instancetype) initWithContentType: (NSString *)contentType
49  fileURL: (NSURL*)fileURL
50  error: (NSError**)error;
51 
52 - (instancetype) init NS_UNAVAILABLE;
53 
56 @property (readonly, nonatomic, nullable) NSData* content;
57 
60 @property (readonly, nonatomic, nullable) NSInputStream *contentStream;
61 
63 @property (readonly, nonatomic, nullable) NSString* contentType;
64 
66 @property (readonly, nonatomic) uint64_t length;
67 
69 @property (readonly, nonatomic, nullable) NSString* digest;
70 
72 @property (readonly, nonatomic) NSDictionary* properties;
73 
74 @end
75 
76 NS_ASSUME_NONNULL_END
NSData * content
Gets the contents of a CBLBlob as a block of memory.
Definition: CBLBlob.h:56
NSString * digest
The cryptographic digest of this CBLBlob&#39;s contents, which uniquely identifies it.
Definition: CBLBlob.h:69
NSDictionary * properties
The metadata associated with this CBLBlob.
Definition: CBLBlob.h:72
NSString * contentType
The type of content this CBLBlob represents; by convention this is a MIME type.
Definition: CBLBlob.h:63
NSInputStream * contentStream
A stream of the content of a CBLBlob.
Definition: CBLBlob.h:60
uint64_t length
The binary length of this CBLBlob.
Definition: CBLBlob.h:66
A CBLBlob appears as a property of a CBLDocument; it contains arbitrary binary data, tagged with a MIME type.
Definition: CBLBlob.h:23
instancetype NS_UNAVAILABLE()