00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00016 abstract class Reader
00017 {
00018 const BLOCK_SIZE = 16384;
00019
00020 abstract public function close();
00021 abstract public function read($count);
00022
00023 public function isEof()
00024 {
00025 return false;
00026 }
00027
00028 public function mark()
00029 {
00030 throw new IOException('mark() not supported');
00031 }
00032
00033 public function markSupported()
00034 {
00035 return false;
00036 }
00037
00038 public function reset()
00039 {
00040 throw new IOException('reset() not supported');
00041 }
00042
00043 public function skip($count)
00044 {
00045 return mb_strlen($this->read($count));
00046 }
00047
00048 public function available()
00049 {
00050 return 0;
00051 }
00052
00053 public function getWhole()
00054 {
00055 while (!$this->isEof())
00056 $result .= $this->read(self::BLOCK_SIZE);
00057
00058 return $result;
00059 }
00060 }
00061 ?>