Signed-off-by: Roland Häder <roland@mxchange.org>
* @return $fileName The current file name
*/
function getFileName ();
+
+ /**
+ * Determines whether the EOF has been reached
+ *
+ * @return $isEndOfFileReached Whether the EOF has been reached
+ */
+ function isEndOfFileReached ();
}
// [EOF]
return ftell($this->getPointer());
}
+ /**
+ * Determines whether the EOF has been reached
+ *
+ * @return $isEndOfFileReached Whether the EOF has been reached
+ */
+ public final function isEndOfFileReached () {
+ return feof($this->getPointer());
+ }
+
/**
* Seek to given offset (default) or other possibilities as fseek() gives.
*
// Wait until a entry/block separator has been found
$data = $this->getBackBuffer();
- while (!$this->getBlockInstance()->isBlockSeparatorFound($data)) {
+ while (($this->getPointerInstance()->isEndOfFileReached()) && (!$this->getBlockInstance()->isBlockSeparatorFound($data)) {
// Then read the block
$data .= $this->read($length);
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('data()=' . strlen($data));
} // END - if
/*