9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
* the packaging of this file.
*/
#import "OFSeekableStream.h"
#import "OFExceptions.h"
@implementation OFSeekableStream
- _seekToOffset: (off_t)offset
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (off_t)_seekForwardWithOffset: (off_t)offset
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (off_t)_seekToOffsetRelativeToEnd: (off_t)offset
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- seekToOffset: (off_t)offset
{
[self flushWriteBuffer];
[self _seekToOffset: offset];
[self freeMemory: cache];
cache = NULL;
cache_len = 0;
return self;
}
- (off_t)seekForwardWithOffset: (off_t)offset
{
off_t ret;
[self flushWriteBuffer];
|
|
|
<
<
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
* the packaging of this file.
*/
#import "OFSeekableStream.h"
#import "OFExceptions.h"
@implementation OFSeekableStream
- (void)_seekToOffset: (off_t)offset
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (off_t)_seekForwardWithOffset: (off_t)offset
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (off_t)_seekToOffsetRelativeToEnd: (off_t)offset
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void)seekToOffset: (off_t)offset
{
[self flushWriteBuffer];
[self _seekToOffset: offset];
[self freeMemory: cache];
cache = NULL;
cache_len = 0;
}
- (off_t)seekForwardWithOffset: (off_t)offset
{
off_t ret;
[self flushWriteBuffer];
|