217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
OFURLHandler *URLHandler;
OFStream *stream;
size_t pageSize;
unsigned char *buffer;
if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil)
@throw [OFUnsupportedProtocolException
exceptionWithURL: URL];
stream = [URLHandler openItemAtURL: URL mode: @"r"];
_count = 0;
_itemSize = 1;
_freeWhenDone = true;
pageSize = [OFSystemInfo pageSize];
buffer = OFAllocMemory(1, pageSize);
|
<
|
<
<
<
<
<
<
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
OFStream *stream = [OFURLHandler openItemAtURL: URL mode: @"r"];
size_t pageSize;
unsigned char *buffer;
_count = 0;
_itemSize = 1;
_freeWhenDone = true;
pageSize = [OFSystemInfo pageSize];
buffer = OFAllocMemory(1, pageSize);
|
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
|
}
}
#endif
- (void)writeToURL: (OFURL *)URL
{
void *pool = objc_autoreleasePoolPush();
OFURLHandler *URLHandler;
if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil)
@throw [OFUnsupportedProtocolException exceptionWithURL: URL];
[[URLHandler openItemAtURL: URL mode: @"w"] writeData: self];
objc_autoreleasePoolPop(pool);
}
- (OFXMLElement *)XMLElementBySerializing
{
void *pool;
|
<
<
<
<
|
|
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
}
}
#endif
- (void)writeToURL: (OFURL *)URL
{
void *pool = objc_autoreleasePoolPush();
[[OFURLHandler openItemAtURL: URL mode: @"w"] writeData: self];
objc_autoreleasePoolPop(pool);
}
- (OFXMLElement *)XMLElementBySerializing
{
void *pool;
|