Class MTStream is an abstract class and is not intended to be instantiated
but to serve as a root class to all sorts of streams, like implemented
in classes MTFileStream (5.2)
and MTCompressedFileStream (5.2).
This ensures, that everything that accepts a stream for input or output
follows the defined interface of class MTStream, whether it is a MTFileStream
or a MTCompressedStream.
| * test |
|
-(BOOL)ok |
returns true if the stream is still valid |
|
* operation |
|
|
-(void)close |
close the stream and invalidate it |
| * write access |
|
-(void)writeCString: (const
char*)string |
write C string to the stream |
|
-(void)writeData: (NSData*)data |
write data to the stream |
|
-(void)writeString: (NSString*)string |
write string to the stream |
| * read access |
|
-(NSData*)readLength: (unsigned
int)len |
read data with maximum length from stream |
|
-(NSData*)readLineLength:
(unsigned int)len |
read data line up to the end of line or maximum length |
|
-(NSString*)readStringLineLength:
(unsigned int)len |
read string up to the end of line or maximum length |