public bool Find(int headerID) {
_readValueStart=_data.Length;
_readValueLength=0;
_index=0;
int localLength=_readValueStart;
int localTag=headerID-1;
// Trailing bytes that cant make up an entry (as there arent enough
// bytes for a tag and length) are ignored!
while ((localTag!=headerID)&&(_index<_data.Length-3)) {
localTag=ReadShortInternal();
localLength=ReadShortInternal();
if (localTag!=headerID) {
_index+=localLength;
}
}
bool result=(localTag==headerID)&&((_index+localLength)<=_data.Length);
if (result) {
_readValueStart=_index;
_readValueLength=localLength;
}
return result;
}