/**
* A RawDataOutputStream class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* @param $data The data (string mostly) to "stream"
* @return $data The data (string mostly) to "stream"
- * @todo Do we need to do something more here?
*/
public function streamData ($data) {
- // Encode the data with BASE64 encoding
- $data = base64_encode($data);
+ /*
+ * Encode the data with BASE64 encoding and put it in a "frame":
+ *
+ * [[S]] - Start marker
+ * [[E]] - End marker
+ */
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: data()=' . strlen($data) . ' - BEFORE!');
+ $data = BaseRawDataHandler::STREAM_START_MARKER . base64_encode($data) . BaseRawDataHandler::STREAM_END_MARKER;
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: data()=' . strlen($data) . ' - AFTER!');
// Return it
return $data;