They are pure virtual functions in the base class:
class Stream : public Print
{
protected:
unsigned long _timeout; // number of milliseconds to wait for the next char before aborting timed read
unsigned long _startMillis; // used for timeout measurement
int timedRead(); // private method to read stream with timeout
int timedPeek(); // private method to peek stream with timeout
int peekNextDigit(LookaheadMode lookahead, bool detectDecimal); // returns the next numeric digit in the stream or -1 if timeout
public:
virtual void begin(unsigned long baud) = 0;
virtual int available() = 0;
[b]virtual int read() = 0;[/b]
virtual size_t write(uint8_t) = 0;
[b]virtual int peek() = 0;[/b]
virtual void flush() = 0;
They are defined in the SD library's File class.
But there is no implementation in SD.ccp that I can find.
The author of this library MUST have defined them some where because I am not getting an unresolved symbol compile error.
So where the devil are they defined??????
class File : public Stream {
private:
char _name[13]; // our name
SdFile *_file; // underlying file pointer
public:
File(SdFile f, const char *name); // wraps an underlying SdFile
File(void); // 'empty' constructor
~File(void); // destructor
#if ARDUINO >= 100
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
#else
virtual void write(uint8_t);
virtual void write(const uint8_t *buf, size_t size);
#endif
String readLine();
virtual int read();
virtual int peek();