Number of bytes til end of controlled entity.
when mPosition == mSize-1 there is still one byte left to read, when mPosition == mSize reading is done DK: This is a weird assumptions, because with files this can never be
Definition at line 103 of file IOBuffer.h.
References ILOG_ERROR, mPosition, and mSize.
Referenced by Impala::Application::FileServer::AcceptRequest(), AvailableInt32(), Impala::Core::Geometry::DatabaseReadIxRectangle(), Impala::Util::DatabaseReadNative(), Impala::Util::DatabaseReadString(), Impala::Core::Geometry::DatabaseReadVxRectangle(), Impala::Application::FileClient::DoPut(), Impala::Util::FileCopyRemoteToLocal(), Impala::Persistency::VideoSetRepositoryInFile::Get(), Impala::Persistency::ImageSetRepositoryInFile::Get(), Impala::Persistency::VideoSetsRepository::GetFromFileSystem(), Impala::Persistency::ImageSetsRepository::GetFromFileSystem(), Impala::Util::IOBufferFile::Gets(), Impala::Util::IOBufferChannel::Gets(), Gets(), Impala::Core::VideoSet::InterestPointProc::HandleDoneFile(), Impala::Core::ImageSet::ImageSetRepository::ImageSetRepository(), Impala::Core::Feature::FeatureTable::ImportAscii(), Impala::Core::Database::RawDataSet::Init(), Impala::Core::Feature::LabelSet::Load(), Impala::Core::Training::ApplyConceptsHelperKernels::LoadInfoFile(), Impala::Core::Feature::ConceptSet::MakeFromFile(), Puts(), Impala::Util::IOBufferFile::Read(), Read(), Impala::Core::Feature::LabelSet::Read(), Impala::Util::IOBufferFile::ReadLine(), Impala::Util::IOBufferChannel::ReadLine(), ReadLine(), Impala::Persistency::File::ReadNative(), ReadStrings(), Impala::Persistency::File::ReadStrings(), Impala::Core::VideoSet::VideoSetRepository::VideoSetRepository(), Write(), and WriteIOBufferToChannel().
00104 {
00105 PositionType res = mSize - mPosition;
00106 if (res < 0)
00107 {
00108 ILOG_ERROR("Available: position beyond size");
00109 return 0;
00110 }
00111 if (res == 1)
00112 return 0;
00113 return res;
00114 }