]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/iterator/io/class_FileIoIterator.php
Add stuff for reading header of a file-based stack.
[core.git] / inc / classes / main / iterator / io / class_FileIoIterator.php
index af4c1b47f8b8174a176a7faa7626a72a7de1665f..e6aee1d9190ce602dca07bc4ae1851a3e89ca347 100644 (file)
@@ -93,6 +93,17 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato
                return $this->getPointerInstance()->rewind();
        }
 
+       /**
+        * Checks wether the current entry is valid (not at the end of the file).
+        * This method will return TRUE if an emptied (nulled) entry has been found.
+        *
+        * @return      void
+        */
+       public function valid () {
+               // Call pointer instance
+               return $this->getPointerInstance()->valid();
+       }
+
        /**
         * Seeks to given position
         *
@@ -133,13 +144,14 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the file).
-        * This method will return TRUE if an emptied (nulled) entry has been found.
+        * Reads given amount of bytes from file.
         *
-        * @return      void
+        * @param       $bytes  Amount of bytes to read
+        * @return      $data   Data read from file
         */
-       public function valid () {
-               $this->partialStub('Please implement this method.');
+       public function read ($bytes) {
+               // Call pointer instance
+               return $this->getPointerInstance()->read($bytes);
        }
 }