- fix method truncate()   . if truncating the stream to a larger     chunk that it even is, return FALSE; also if the offset     has been in the truncated range, rewind it to the new end of     the stream
- fix method truncate()
  . if truncating the stream to a larger
    chunk that it even is, return FALSE; also if the offset
    has been in the truncated range, rewind it to the new end of
    the stream

- fix method gets()
  . if the stream pointer is at the end of the stream, return an
    empty string
  . do not create a copy of the stream part that is searched for
    the newline, but rather use the strpos()-offset parameter to
    do this; this includes the backdraw that we will search the whole
    stream instead of only $bytes bytes in worst case, but that is 
    rather unlikely, so I chose to live with this tradeoff.

- fix method read()
  . if the stream pointer is at the end of the stream, return an
    empty string
  . only advance the stream pointer by the amount of actually read
    bytes, not the maximum read bytes $bytes.

- improve method write()
  . in the common case where data is appended to the end of the stream
    use the string concatenation operator
  . only use the more expensive substr() + concat + substr() method 
    in cases where the stream pointer is not at the end of the
    stream.

- fix method seek()
  . adjust the stream pointer to point at the end of the stream if
    it was moved outside of the stream range

- QA: remove @throws leftover


git-svn-id: 526f3b90ad6d9b1dfe840af828070ca3d99521ac@5482 d2cacbed-c0f6-0310-851a-9dad52fc623a

johannes85/core