template<class NativeType>
Reimplemented from Impala::Util::IOBuffer. Definition at line 337 of file IOBufferFile.h. References FTell(), Impala::Util::IOBuffer::GetBuffer(), Impala::Util::IOBuffer::GetPosition(), mFile, mUseMemory, SetPosition(), and Impala::Util::IOBuffer::SetPositionAndSize(). Referenced by NativeTypeWrite(). 00338 { 00339 String fs = NativeTypeFormat<NativeType>(0) + " "; 00340 if (mUseMemory) 00341 { 00342 char* start = (char*) (GetBuffer() + GetPosition()); 00343 sprintf(start, fs.c_str(), val); 00344 Int64 i = 0; 00345 while (start[i] != ' ') 00346 i++; 00347 SetPosition(GetPosition() + i + 1); 00348 } 00349 else 00350 { 00351 fprintf(mFile, fs.c_str(), val); 00352 SetPositionAndSize(FTell(mFile)); 00353 } 00354 }
Here is the call graph for this function:
|