669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
|
- (int)fileDescriptorForReading
{
return [_stream fileDescriptorForReading];
}
- (bool)hasDataInReadBuffer
{
return ([super hasDataInReadBuffer] || [_stream hasDataInReadBuffer]);
}
- (void)close
{
/* Give back our buffer to the stream, in case it's shared */
[_stream unreadFromBuffer: _buffer + _bufferIndex
length: _bufferLength - _bufferIndex];
|
|
>
|
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
|
- (int)fileDescriptorForReading
{
return [_stream fileDescriptorForReading];
}
- (bool)hasDataInReadBuffer
{
return ([super hasDataInReadBuffer] || [_stream hasDataInReadBuffer] ||
_bufferLength - _bufferIndex > 0);
}
- (void)close
{
/* Give back our buffer to the stream, in case it's shared */
[_stream unreadFromBuffer: _buffer + _bufferIndex
length: _bufferLength - _bufferIndex];
|