// Is the file initialized?
if ($this->isFileInitialized()) {
// Some bytes has been written, so rewind to start of it.
- $rewindStatus = $this->getIteratorInstance()->rewind();
+ $rewindStatus = $this->rewind();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] rewindStatus=%s', __METHOD__, __LINE__, $rewindStatus));
// Is the rewind() call successfull?
} // END - if
// Read file header
- $this->getBlockInstance()->readFileHeader();
+ $this->readFileHeader();
// The above method does already check the header
$isInitialized = TRUE;
assert(!$this->isFileHeaderInitialized());
// Simple flush file header which will create it.
- $this->getBlockInstance()->flushFileHeader();
+ $this->flushFileHeader();
// Rewind seek position (to beginning of file) and update/flush file header
$this->rewineUpdateSeekPosition();
} // END - if
// Make sure the block instance is set
- assert($this->getBlockInstance() instanceof CalculatableBlock);
+ assert($this->getBlockInstance() instanceof Block);
// First calculate minimum block length
$length = $this->getBlockInstance()->calculateMinimumBlockLength();
*/
public function valid () {
// Make sure the block instance is set
- assert($this->getBlockInstance() instanceof CalculatableBlock);
+ assert($this->getBlockInstance() instanceof Block);
// First calculate minimum block length
$length = $this->getBlockInstance()->calculateMinimumBlockLength();
// Call pointer instance
return $this->getPointerInstance()->determineSeekPosition();
}
+
+ /**
+ * Reads the file header
+ *
+ * @return void
+ */
+ public function readFileHeader () {
+ // Make sure the block instance is set
+ assert($this->getBlockInstance() instanceof Block);
+
+ // Call block instance
+ $this->getBlockInstance()->readFileHeader();
+ }
+
+ /**
+ * Flushes the file header
+ *
+ * @return void
+ */
+ public function flushFileHeader () {
+ // Make sure the block instance is set
+ assert($this->getBlockInstance() instanceof Block);
+
+ // Call block instance
+ $this->getBlockInstance()->flushFileHeader();
+ }
}
// [EOF]