@@ -8,10 +8,11 @@ * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" +#import "OFString.h" /** * The OFStream class provides a base class for different types of streams. */ @interface OFStream: OFObject @@ -35,13 +36,13 @@ * Read until a newline or \0 occurs. * * If you want to use readNBytes afterwards again, you have to clear the cache * before and optionally get the cache before clearing it! * - * \return The line that was read. Use freeMem: to free it! + * \return The line that was read, autoreleased. */ -- (char*)readLine; +- (OFString*)readLine; /** * Writes from a buffer into the stream. * * \param buf The buffer from which the data is written to the stream @@ -50,16 +51,16 @@ */ - (size_t)writeNBytes: (size_t)size fromBuffer: (const char*)buf; /** - * Writes a C string into the stream, without the trailing zero. + * Writes a string into the stream, without the trailing zero. * - * \param str The C string from which the data is written to the stream + * \param str The string from which the data is written to the stream * \return The number of bytes written */ -- (size_t)writeCString: (const char*)str; +- (size_t)writeString: (OFString*)str; /** * Sets a specified pointer to the cache and returns the length of the cache. * * \param ptr A pointer to a pointer. It will be set to the cache.