protected void refillBuffer()
{
if (pendinglen > 0 || eof)
return; // only if not pending data
try
{
// try to read
offset = 0;
pendinglen = _stream.Read(buf,0,buf.Length);
if (pendinglen < 0)
{
close();
return;
}
else
return;
}
catch (IOException e)
{
throw new PngjInputException(e);
}
}