Home || Architecture || Video Search || Visual Search || Scripts || Applications || 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 93 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::Application::IDash::mainIDashServer(), and Impala::Application::SDash::RegionsOfInterestInfo::RegionsOfInterestInfo().

00094     {
00095         Int64 available = Available();
00096         if (available < bytesToRead)
00097             bytesToRead = available;
00098         if (mUseMemory)
00099         {
00100             memcpy(buf, GetBuffer() + GetPosition(), bytesToRead);
00101         }
00102         else
00103         {
00104             FSeek(mFile, GetPosition(), SEEK_SET);
00105             Int64 nRead = fread(buf, 1, bytesToRead, mFile);
00106         }
00107         SetPosition(GetPosition() + bytesToRead);
00108         return bytesToRead;
00109     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:40:41 2010 for ImpalaSrc by  doxygen 1.5.1