X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffile_directories%2Fbinary%2Findex%2Fclass_IndexFile.php;h=8fd85d3dc21351bf755439e46a59d80f2c5d8fa1;hp=ab1da24a13b4bed3e77c451151f67256a309d19e;hb=bde1a7331a8a5c1e4a304583c0db268026aeb8a8;hpb=f724cf4b97b80ee1c886d6d4d01ab05b4d3341bf diff --git a/inc/classes/main/file_directories/binary/index/class_IndexFile.php b/inc/classes/main/file_directories/binary/index/class_IndexFile.php index ab1da24a..8fd85d3d 100644 --- a/inc/classes/main/file_directories/binary/index/class_IndexFile.php +++ b/inc/classes/main/file_directories/binary/index/class_IndexFile.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -52,6 +52,33 @@ class IndexFile extends BaseBinaryFile implements Block { // Return the prepared instance return $fileInstance; } + + /** + * Writes given value to the file and returns a hash and gap position for it + * + * @param $groupId Group identifier + * @param $value Value to be added to the stack + * @return $data Hash and gap position + * @throws UnsupportedOperationException If this method is called + */ + public function writeValueToFile ($groupId, $value) { + self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, TRUE)); + throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + } + + /** + * Writes given raw data to the file and returns a gap position and length + * + * @param $groupId Group identifier + * @param $hash Hash from encoded value + * @param $encoded Encoded value to be written to the file + * @return $data Gap position and length of the raw data + * @throws UnsupportedOperationException If this method is called + */ + public function writeDataToFreeGap ($groupId, $hash, $encoded) { + self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',encoded()=' . strlen($encoded)); + throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + } } // [EOF]