Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

virtual Int64 Impala::Util::IOBufferFile::Read ( void *  buf,
Int64  bytesToRead 
) [inline, virtual]

returns number of bytes read

Reimplemented from Impala::Util::IOBuffer.

Definition at line 99 of file IOBufferFile.h.

References Impala::Util::IOBuffer::Available(), FSeek(), Impala::Util::IOBuffer::GetBuffer(), Impala::Util::IOBuffer::GetPosition(), mFile, mUseMemory, and SetPosition().

Referenced by Impala::Application::FileServer::AcceptRequest(), Impala::Application::DataServer::AcceptRequest(), Impala::Application::FileClient::DoPut(), Impala::Util::FileCopyLocalToRemote(), Impala::Application::IDash::mainIDashServer(), and Impala::Application::SDash::RegionsOfInterestInfo::RegionsOfInterestInfo().

00100     {
00101         Int64 available = Available();
00102         if (available < bytesToRead)
00103             bytesToRead = available;
00104         if (mUseMemory)
00105         {
00106             memcpy(buf, GetBuffer() + GetPosition(), bytesToRead);
00107         }
00108         else
00109         {
00110             FSeek(mFile, GetPosition(), SEEK_SET);
00111             Int64 nRead = fread(buf, 1, bytesToRead, mFile);
00112         }
00113         SetPosition(GetPosition() + bytesToRead);
00114         return bytesToRead;
00115     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:24:16 2011 for ImpalaSrc by  doxygen 1.5.1