+ /**
+ * Checks whether the abstracted file only contains gaps by counting all
+ * gaps' bytes together and compare it to total length.
+ *
+ * @return $isGapsOnly Whether the abstracted file only contains gaps
+ */
+ private function isFileOnlyGaps () {
+ // First/last gap found?
+ /* Only for debugging
+ if (isset($this->gaps[0])) {
+ // Output first and last gap
+ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] this->gaps[0]=%s,this->gaps[%s]=%s', __METHOD__, __LINE__, print_r($this->gaps[0], TRUE), (count($this->gaps) - 1), print_r($this->gaps[count($this->gaps) - 1], TRUE)));
+ } // END - if
+ */
+
+ // Now count every gap
+ $gapsSize = 0;
+ foreach ($this->gaps as $gap) {
+ // Calculate size of found gap: end-start including both
+ $gapsSize += ($gap[self::GAPS_INDEX_END] - $gap[self::GAPS_INDEX_START]);
+ } // END - if
+
+ // Debug output
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] gapsSize=%s,this->headerSize=%s', __METHOD__, __LINE__, $gapsSize, $this->getHeaderSize()));
+
+ // Total gap size + header size must be same as file size
+ $isGapsOnly = (($this->getHeaderSize() + $gapsSize) == $this->getFileSize());
+
+ // Return status
+ return $isGapsOnly;
+ }
+