28 #ifndef _ID3LIB_READER_H_
29 #define _ID3LIB_READER_H_
72 this->readChars(&ch, 1);
90 return this->readChars(
reinterpret_cast<char_type *
>(buf), len);
102 while (!this->atEnd() && remaining > 0)
104 remaining -= this->readChars(bytes, (remaining < SIZE ? remaining : SIZE));
106 return len - remaining;
111 pos_type end = this->getEnd(), cur = this->getCur();
125 virtual bool atEnd() {
return this->getCur() >= this->getEnd(); }
virtual size_type readChars(char buf[], size_type len)
virtual size_type skipChars(size_type len)
Skip up to len chars in the stream and advance the internal position accordingly.
virtual pos_type setCur(pos_type pos)=0
Set the value of the current position for reading.
static const int_type END_OF_READER
virtual pos_type getCur()=0
Return the current position in the reader.
virtual size_type readChars(char_type buf[], size_type len)=0
Read up to len characters into buf and advance the internal position accordingly.
virtual int_type readChar()
Read a single character and advance the internal position.
virtual pos_type getEnd()
Return the ending position in the reader.
virtual size_type remainingBytes()
virtual pos_type getBeg()
Return the beginning position in the reader.
virtual int_type peekChar()=0
Return the next character to be read without advancing the internal position.
virtual void close()=0
Close the reader.