public function tell()
{
if (!$this->isSeekable()) {
throw new ReadException('Cannt tell offset of this kind of stream.');
}
$ret = ftell($this->resource);
if ($ret === false) {
throw new ReadException('Cannot tell offset of stream.');
}
return $ret;
}