24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
-
+
-
-
+
+
|
@interface StreamTester: OFStream
{
int state;
}
@end
@implementation StreamTester
- (BOOL)atEndOfStreamWithoutCache
- (BOOL)_atEndOfStream
{
return (state > 1 ? YES : NO);
}
- (size_t)readNBytesWithoutCache: (size_t)size
intoBuffer: (char*)buf
- (size_t)_readNBytes: (size_t)size
intoBuffer: (char*)buf
{
switch (state) {
case 0:
if (size < 1)
return 0;
memcpy(buf, "f", 1);
|