-[NSInputStream read:maxLength:] returns an NSInteger, and can potentially return -1