+ /**
+ * Reads the file header
+ *
+ * @return void
+ * @throws LogicException If both instances are not set
+ */
+ public function readFileHeader () {
+ // Call stacke instance
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('STACK-FILE: Calling this->stackInstance->readStackHeader() - CALLED!');
+ $this->getStackInstance()->readStackHeader();
+
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('STACK-FILE: EXIT!');
+ }
+
+ /**
+ * Reads next "block" of bytes into $currentBlock field. THis method loads
+ * the whole file into memory when the file is just freshly initialized
+ * (only zeros in it).
+ *
+ * @return void
+ */
+ protected function readNextBlock () {
+ // First calculate minimum block length
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STACK-FILE: this->seekPosition=%d - CALLED!', $this->getSeekPosition()));
+ $length = $this->getStackInstance()->calculateMinimumBlockLength();
+
+ // Call protected method
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STACK-FILE: Calling parent::readNextBlockByLength(%d) ...', $length));
+ parent::readNextBlockByLength($length);
+
+ // Trace message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('STACK-FILE: EXIT!');
+ }
+