Go back to:
Stream
A Stream supports the following functions:
Method
- print
- Prints the value of a number, or a string, to the stream.
- print_P
- Prints a string from program memory to the stream.
- println
- Sends a carriage return line feed sequence to the stream to indicate the end of a line of text.
- read
- Reads the next byte from the device. This will return EOF, the end of file marker, if there are no characters available - otherwise it will return the next byte.
- write
- Writes a single byte to the output stream. The returned value is normally the same value as the byte just written but on some devices it can return EOF to indicate a write error. For eaxmple: writing a byte out to a file stored on a µSD card may return EOF if there is no available space.
- write
- Writes out a sequence of bytes from a given position in RAM. The returned value is the number of bytes actually written. This would only be less than the reqested number of bytes if there is an error writing to the stream.
- write_P
- Writes out a sequence of bytes from a given position in program memory. The returned value is the number of bytes actually written. This would only be less than the reqested number of bytes if there is an error writing to the stream.
The following classes provide additional functionality