-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Not a Bug
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Documentation
-
Labels:None
You may use skip() function to return character to the steam (skip(-nChars)). When you read the block again, the reading must start from -nChars offset.
But in the following case the function doesn't work.
LocalFileAdapter has BUF_SIZE variable. Suppose BUF_SIZE=30.
//pseudo code
{
io->readBlock(buf, 30);
//30 first chars in the internal buffer
io->readBlock(buf, 30);
//30 next chars in the internal buffer
io->skip(-35);
//we cannot seek to the first buffer block because it's lost
//and the next reading will not start from -35 offset
}
The bug came from "SNP project".