From 2d522cf6b7be0a4e58d2111ed9f939d6e3019582 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 9 Jun 2007 10:06:53 +0000 Subject: 2007-06-09 Tatsuhiro Tsujikawa Added -j command-line option. * src/OptionHandlerFactory.cc (createOptionHandlers) * src/main.cc * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc Rewritten using stringstream. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc Rewritten using stringstream. --- src/ByteArrayDiskWriter.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/ByteArrayDiskWriter.h') diff --git a/src/ByteArrayDiskWriter.h b/src/ByteArrayDiskWriter.h index c5390507..4e60bcda 100644 --- a/src/ByteArrayDiskWriter.h +++ b/src/ByteArrayDiskWriter.h @@ -36,14 +36,12 @@ #define _D_BYTE_ARRAY_DISK_WRITER_H_ #include "DiskWriter.h" +#include class ByteArrayDiskWriter : public DiskWriter { private: - char* buf; - int32_t maxBufLength; - int32_t bufLength; + stringstream buf; - void init(); void clear(); public: ByteArrayDiskWriter(); @@ -66,7 +64,7 @@ public: virtual int64_t size() const { - return bufLength; + return buf.str().size(); } // not implemented yet @@ -76,15 +74,6 @@ public: return ""; } #endif // ENABLE_MESSAGE_DIGEST - - const char* getByteArray() const { - return buf; - } - - // can be deleted. Use size() instead. - int getByteArrayLength() const { - return bufLength; - } }; #endif // _D_BYTE_ARRAY_DISK_WRITER_H_ -- cgit