64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{
if (self == [TarArchive class])
app = (OFArc *)[OFApplication sharedApplication].delegate;
}
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
encoding: (of_string_encoding_t)encoding
{
return [[[self alloc] initWithStream: stream
mode: mode
encoding: encoding] autorelease];
}
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
encoding: (of_string_encoding_t)encoding
{
self = [super init];
@try {
_archive = [[OFTarArchive alloc] initWithStream: stream
mode: mode];
if (encoding != OF_STRING_ENCODING_AUTODETECT)
_archive.encoding = encoding;
} @catch (id e) {
[self release];
@throw e;
}
return self;
|
|
|
|
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{
if (self == [TarArchive class])
app = (OFArc *)[OFApplication sharedApplication].delegate;
}
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
encoding: (OFStringEncoding)encoding
{
return [[[self alloc] initWithStream: stream
mode: mode
encoding: encoding] autorelease];
}
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
encoding: (OFStringEncoding)encoding
{
self = [super init];
@try {
_archive = [[OFTarArchive alloc] initWithStream: stream
mode: mode];
if (encoding != OFStringEncodingAutodetect)
_archive.encoding = encoding;
} @catch (id e) {
[self release];
@throw e;
}
return self;
|