* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class NetworkPackageCompressorDecorator extends BaseHubSystem implements Compressor {
+ /**
+ * A Compressor instance
+ */
+ private $compressorInstance = NULL;
+
/**
* Protected constructor
*
return $compressorInstance;
}
+ /**
+ * Setter for compressor instance
+ *
+ * @param $compressorInstance An instance of a Compressor class
+ * @return void
+ */
+ protected final function setCompressorInstance (Compressor $compressorInstance) {
+ $this->compressorInstance = $compressorInstance;
+ }
+
+ /**
+ * Getter for compressor instance
+ *
+ * @return $compressorInstance An instance of a Compressor class
+ */
+ private final function getCompressorInstance () {
+ return $this->compressorInstance;
+ }
+
/**
* A compression stream
*
const EXCEPTION_UNEXPECTED_PACKAGE_STATUS = 0xff00;
const EXCEPTION_INVALID_DATA_CHECKSUM = 0xff01;
+ /**
+ * A Compressor instance
+ */
+ private $compressorInstance = NULL;
+
/**
* Protected constructor
*
return $packageInstance;
}
+ /**
+ * Setter for compressor instance
+ *
+ * @param $compressorInstance An instance of a Compressor class
+ * @return void
+ */
+ protected final function setCompressorInstance (Compressor $compressorInstance) {
+ $this->compressorInstance = $compressorInstance;
+ }
+
+ /**
+ * Getter for compressor instance
+ *
+ * @return $compressorInstance An instance of a Compressor class
+ */
+ private final function getCompressorInstance () {
+ return $this->compressorInstance;
+ }
+
/**
* Initialize all stackers
*
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
/**
* A PackageFragmenter class to fragment package data into smaller chunks for
$this->chunkSize = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('package_chunk_size');
// - Maximum serial number
- $this->maxSerialNumber = $this->hex2dec(str_repeat('f', self::MAX_SERIAL_LENGTH));
+ $this->maxSerialNumber = StringUtils::hex2dec(str_repeat('f', self::MAX_SERIAL_LENGTH));
// Trace message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: EXIT!');
// Encode the current serial number
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-FRAGMENTER: serialNumber[' . $finalHash . ']=' . $this->serialNumber[$finalHash]);
- $encodedSerialNumber = $this->dec2Hex($this->serialNumber[$finalHash], self::MAX_SERIAL_LENGTH);
+ $encodedSerialNumber = StringUtils::dec2hex($this->serialNumber[$finalHash], self::MAX_SERIAL_LENGTH);
// Count one up
$this->serialNumber[$finalHash]++;
-Subproject commit 3b182d1633e936618e118773da67fa41b24a6109
+Subproject commit dd1cef3878259d544e9853b1c0f5abca1f0d99b1