Added NSInputStream support