2025-05-20 22:30:48 +02:00

37 lines
568 B
Objective-C

#import "TGDataItem.h"
@interface TGDataItem () {
NSMutableData *_data;
}
@end
@implementation TGDataItem
- (instancetype)init {
self = [super init];
if (self != nil) {
_data = [[NSMutableData alloc] init];
}
return self;
}
- (instancetype)initWithData:(NSData *)data {
self = [super init];
if (self != nil) {
_data = [[NSMutableData alloc] init];
[self appendData:data];
}
return self;
}
- (void)appendData:(NSData *)data {
[_data appendData:data];
}
- (NSData *)data {
return _data;
}
@end