1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "CopyJob.h" CopyJob::CopyJob(Handle & as, Handle & ad) : s(as), d(ad) { } CopyJob::~CopyJob() { } int CopyJob::Do() { int r; char buffer[4096]; while (!s.IsClosed()) { r = s.read(buffer, 4096); d.write(buffer, r); } }