I implemented NSInputStream
subclass like following:
ClassName: SampleInputStream
-(id)init{
self = [super init];
if (self) {
}
return self;
}
- (NSInteger)read:(const uint8_t *)buffer
maxLength:(NSUInteger)length{
return 0;
}
- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len{
return YES;
}
After that I am calling this class from other class like this
SampleInputStream *obj = [[SampleInputStream alloc] init];
But the read
method and getBuffer
method are not calling.
Could you please suggest.