[Box Backup-commit] COMMIT r2426 - box/trunk/lib/common

boxbackup-dev@boxbackup.org boxbackup-dev@boxbackup.org
Sat, 3 Jan 2009 08:57:53 +0000 (GMT)


Author: chris
Date: 2009-01-03 08:57:53 +0000 (Sat, 03 Jan 2009)
New Revision: 2426

Modified:
   box/trunk/lib/common/IOStream.h
Log:
Add a method to write a C style string directly to an IOStream.


Modified: box/trunk/lib/common/IOStream.h
===================================================================
--- box/trunk/lib/common/IOStream.h	2009-01-03 08:56:47 UTC (rev 2425)
+++ box/trunk/lib/common/IOStream.h	2009-01-03 08:57:53 UTC (rev 2426)
@@ -44,6 +44,10 @@
 	virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite) = 0;
 	virtual pos_type BytesLeftToRead();	// may return IOStream::SizeOfStreamUnknown (and will for most stream types)
 	virtual void Write(const void *pBuffer, int NBytes) = 0;
+	virtual void Write(const char *pBuffer)
+	{
+		Write(pBuffer, strlen(pBuffer));
+	}
 	virtual void WriteAllBuffered();
 	virtual pos_type GetPosition() const;
 	virtual void Seek(pos_type Offset, int SeekType);