]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php
Continued:
[core.git] / framework / main / classes / file_directories / input / text / class_FrameworkTextFileInputPointer.php
index 20e127f26edeaab359200f616a0c11e26e0e817a..3fc1fc93ea631439d87eddfbfcc4867dd8a4686c 100644 (file)
@@ -122,7 +122,10 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer {
         */
        public function read (int $bytes = 0) {
                // Some sanity checks
-               if (is_null($this->getFileObject())) {
+               if ($bytes < 0) {
+                       // Cannot be below zero
+                       throw new InvalidArgumentException(sprintf('bytes=%d is not valid', $bytes));
+               } elseif (is_null($this->getFileObject())) {
                        // Pointer not initialized
                        throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
                } elseif (!is_object($this->getFileObject())) {
@@ -151,7 +154,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer {
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       public function analyzeFile () {
+       public function analyzeFileStructure () {
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }