171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
- (OFLHAArchiveEntry *)nextEntry
{
char header[21];
size_t headerLen;
if (_mode != modeRead)
@throw [OFInvalidArgumentException exception];
[_currentEntry release];
_currentEntry = nil;
[(OFLHAArchiveFileReadStream *)_lastReturnedStream of_skip];
@try {
[_lastReturnedStream close];
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
- (OFLHAArchiveEntry *)nextEntry
{
char header[21];
size_t headerLen;
if (_mode != modeRead)
@throw [OFInvalidArgumentException exception];
if (_currentEntry != nil && _lastReturnedStream == nil) {
/*
* No read stream was created since the last call to
* -[nextEntry]. Create it so that we can properly skip the
* data.
*/
void *pool = objc_autoreleasePoolPush();
[self streamForReadingCurrentEntry];
objc_autoreleasePoolPop(pool);
}
[_currentEntry release];
_currentEntry = nil;
[(OFLHAArchiveFileReadStream *)_lastReturnedStream of_skip];
@try {
[_lastReturnedStream close];
|
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
@throw [OFTruncatedDataException exception];
}
headerLen += [_stream readIntoBuffer: header + headerLen
length: 21 - headerLen];
}
_currentEntry= [[OFLHAArchiveEntry alloc]
of_initWithHeader: header
stream: _stream
encoding: _encoding];
return _currentEntry;
}
|
|
|
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
@throw [OFTruncatedDataException exception];
}
headerLen += [_stream readIntoBuffer: header + headerLen
length: 21 - headerLen];
}
_currentEntry = [[OFLHAArchiveEntry alloc]
of_initWithHeader: header
stream: _stream
encoding: _encoding];
return _currentEntry;
}
|