session-ios/SignalServiceKit/src/Devices/OWSChunkedOutputStream.m
Michael Kirk ccb4a88742 Import SSK (and history) into Signal-iOS
git remote add ssk ../SignalServiceKit
git remote update
git merge -s ours --allow-unrelated-histories --no-commit ssk/master
git read-tree --prefix=SignalServiceKit -u ssk/master
git commit
2017-07-21 13:55:01 -04:00

35 lines
660 B
Objective-C

// Copyright © 2016 Open Whisper Systems. All rights reserved.
#import "OWSChunkedOutputStream.h"
#import <ProtocolBuffers/CodedOutputStream.h>
NS_ASSUME_NONNULL_BEGIN
@implementation OWSChunkedOutputStream
+ (instancetype)streamWithOutputStream:(NSOutputStream *)output
{
return [[self alloc] initWithOutputStream:output];
}
- (instancetype)initWithOutputStream:(NSOutputStream *)outputStream
{
self = [super init];
if (!self) {
return self;
}
_delegateStream = [PBCodedOutputStream streamWithOutputStream:outputStream];
return self;
}
- (void)flush
{
[self.delegateStream flush];
}
@end
NS_ASSUME_NONNULL_END