ESP32 PSRAM Library
|
A file-like interface for vector-backed storage in memory. More...
#include <InMemoryFile.h>
Public Types | |
using | oneShotMs = esp8266::polledTimeout::oneShotFastMs |
Time management for stream operations. | |
enum class | Report { Success = 0 , TimedOut , ReadError , WriteError , ShortOperation } |
Status codes for stream transfer operations. More... | |
Public Member Functions | |
InMemoryFile () | |
Default constructor - initializes with internal vector. | |
InMemoryFile (const char *filename, FileMode mode) | |
Constructor with filename and mode. More... | |
virtual | ~InMemoryFile () |
Destructor - ensures proper cleanup. | |
int | available () override |
Get the number of bytes available to read. More... | |
virtual int | availableForWrite () |
Get the number of bytes available in the write buffer. More... | |
size_t | capacity () const |
Get the number of bytes that can be held in current storage. Please note that this might dynamically grow! More... | |
void | clearWriteError () |
Clear the write error state. | |
void | close () |
Close the file. | |
bool | find (char target) |
Search for a single character in the stream. More... | |
bool | find (const char *target) |
Search for a string in the stream. More... | |
bool | find (const char *target, size_t length) |
Search for a string of given length in the stream. More... | |
bool | find (const uint8_t *target, size_t length) |
Search for a string of given length in the stream (uint8_t variant) More... | |
bool | find (uint8_t *target) |
Search for a string in the stream (uint8_t variant) More... | |
bool | findUntil (const char *target, const char *terminator) |
Search for a string until a terminator is found. More... | |
bool | findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen) |
Search for a string of given length until a terminator is found. More... | |
bool | findUntil (const uint8_t *target, const char *terminator) |
Search for a string until a terminator is found (uint8_t variant) More... | |
bool | findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen) |
Search for a string of given length until a terminator is found (uint8_t variant) More... | |
void | flush () override |
Ensure all data is committed to the storage No-op for this implementation since data is in memory. | |
Report | getLastSendReport () const |
Get the result of the last send operation. More... | |
unsigned long | getTimeout () const |
Get the current timeout setting. More... | |
int | getWriteError () |
Get the current write error state. More... | |
virtual bool | hasPeekBufferAPI () const |
Check if this stream implements the peek buffer API. More... | |
virtual bool | inputCanTimeout () |
Check if input operations can timeout. More... | |
bool | isOpen () const |
Check if file is open. More... | |
String | name () const |
Get the name of the file. More... | |
bool | open (FileMode mode) |
Open the file with the specified mode. More... | |
operator bool () const | |
virtual bool | outputCanTimeout () |
Check if the output can timeout. More... | |
float | parseFloat () |
Parse a float from the stream. More... | |
long | parseInt () |
Parse an integer from the stream. More... | |
int | peek () override |
Peek at the next byte without advancing the position. More... | |
virtual size_t | peekAvailable () |
Get the number of bytes available in the peek buffer. More... | |
virtual const char * | peekBuffer () |
Get a pointer to the peek buffer. More... | |
virtual void | peekConsume (size_t consume) |
Consume bytes from the peek buffer. More... | |
size_t | position () const |
Get the current position in the file. More... | |
size_t | print (char) |
Print a single character. More... | |
size_t size_t size_t | print (const __FlashStringHelper *) |
Print a flash string. More... | |
size_t | print (const char[]) |
Print a null-terminated string. More... | |
size_t | print (const Printable &) |
Print a Printable object. More... | |
size_t | print (const String &) |
Print a String object. More... | |
size_t | print (double, int=2) |
Print a floating point value. More... | |
size_t | print (int, int=DEC) |
Print an integer value. More... | |
size_t | print (long long, int=DEC) |
Print a long long integer value. More... | |
size_t | print (long, int=DEC) |
Print a long integer value. More... | |
size_t | print (unsigned char, int=DEC) |
Print an unsigned byte value. More... | |
size_t | print (unsigned int, int=DEC) |
Print an unsigned integer value. More... | |
size_t | print (unsigned long long, int=DEC) |
Print an unsigned long long integer value. More... | |
size_t | print (unsigned long, int=DEC) |
Print an unsigned long integer value. More... | |
size_t | printf (const char *format,...) __attribute__((format(printf |
Print formatted data (printf style) More... | |
size_t size_t | printf_P (PGM_P format,...) __attribute__((format(printf |
Print formatted data from program memory (printf style) More... | |
size_t | println (char) |
Print a single character followed by a newline. More... | |
size_t | println (const __FlashStringHelper *) |
Print a flash string followed by a newline. More... | |
size_t | println (const char[]) |
Print a null-terminated string followed by a newline. More... | |
size_t | println (const Printable &) |
Print a Printable object followed by a newline. More... | |
size_t | println (const String &s) |
Print a String object followed by a newline. More... | |
size_t | println (double, int=2) |
Print a floating point value followed by a newline. More... | |
size_t | println (int, int=DEC) |
Print an integer value followed by a newline. More... | |
size_t | println (long long, int=DEC) |
Print a long long integer value followed by a newline. More... | |
size_t | println (long, int=DEC) |
Print a long integer value followed by a newline. More... | |
size_t | println (unsigned char, int=DEC) |
Print an unsigned byte value followed by a newline. More... | |
size_t | println (unsigned int, int=DEC) |
Print an unsigned integer value followed by a newline. More... | |
size_t | println (unsigned long long, int=DEC) |
Print an unsigned long long integer value followed by a newline. More... | |
size_t | println (unsigned long, int=DEC) |
Print an unsigned long integer value followed by a newline. More... | |
size_t | println (void) |
Print just a newline. More... | |
template<> | |
size_t | printNumber (double number, uint8_t digits) |
Specialized template for printing floating point numbers. More... | |
int | read () override |
Read a single byte from the file. More... | |
int | read (char *buffer, size_t len) |
Read multiple bytes from the stream (char variant) More... | |
virtual int | read (uint8_t *buffer, size_t len) |
Read multiple bytes from the stream. More... | |
size_t | readBytes (char *buffer, size_t size) override |
Read multiple bytes from the file. More... | |
virtual size_t | readBytes (uint8_t *buffer, size_t length) |
Read bytes from the stream into a buffer (uint8_t variant) More... | |
size_t | readBytesUntil (char terminator, char *buffer, size_t length) |
Read bytes until a terminator character is found. More... | |
size_t | readBytesUntil (char terminator, uint8_t *buffer, size_t length) |
Read bytes until a terminator character is found (uint8_t variant) More... | |
virtual String | readString () |
Read a string from the stream. More... | |
String | readStringUntil (char terminator) |
Read a string until a terminator character is found. More... | |
String | readStringUntil (const char *terminator, uint32_t untilTotalNumberOfOccurrences=1) |
Read a string until a terminator string is found a specific number of times. More... | |
bool | reserve (size_t new_cap) |
Reserve storage. More... | |
bool | seek (size_t pos) |
Set the current position in the file. More... | |
size_t | sendAll (Print &to, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer all data with timeout (deprecated) More... | |
size_t | sendAll (Print *to, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer all data with timeout (deprecated) More... | |
size_t | sendAll (Stream &&to, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer all data with timeout. More... | |
size_t | sendAll (Stream &to, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer all data with timeout. More... | |
size_t | sendAll (Stream *to, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer all data with timeout. More... | |
size_t | sendAvailable (Print &to) |
Transfer available data without waiting (deprecated) More... | |
size_t | sendAvailable (Print *to) |
Transfer available data without waiting (deprecated) More... | |
size_t | sendAvailable (Stream &&to) |
Transfer available data without waiting. More... | |
size_t | sendAvailable (Stream &to) |
Transfer available data without waiting. More... | |
size_t | sendAvailable (Stream *to) |
Transfer available data without waiting. More... | |
size_t | sendSize (Print &to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer a specific amount of data with timeout (deprecated) More... | |
size_t | sendSize (Print *to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer a specific amount of data with timeout (deprecated) More... | |
size_t | sendSize (Stream &&to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer a specific amount of data with timeout. More... | |
size_t | sendSize (Stream &to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer a specific amount of data with timeout. More... | |
size_t | sendSize (Stream *to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer a specific amount of data with timeout. More... | |
size_t | sendUntil (Print &to, const int readUntilChar, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer data until a specific character is found (deprecated) More... | |
size_t | sendUntil (Print *to, const int readUntilChar, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer data until a specific character is found (deprecated) More... | |
size_t | sendUntil (Stream &&to, const int readUntilChar, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer data until a specific character is found. More... | |
size_t | sendUntil (Stream &to, const int readUntilChar, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer data until a specific character is found. More... | |
size_t | sendUntil (Stream *to, const int readUntilChar, const oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Transfer data until a specific character is found. More... | |
void | setName (const char *name) |
Set the name of this file. More... | |
void | setTimeout (unsigned long timeout) |
Set the timeout for stream operations. More... | |
void | setVector (VectorType *vec) |
Set the vector to use for this file. More... | |
size_t | size () const |
Get the size of the file. More... | |
virtual ssize_t | streamRemaining () |
Get the number of bytes remaining in the stream. More... | |
void | truncate () |
Truncate the file to the current position. | |
size_t | write (char c) |
Write a char value as a byte. More... | |
size_t | write (const char *buffer, size_t size) |
Write a buffer of characters to the output. More... | |
size_t | write (const char *str) |
Write a null-terminated string to the output. More... | |
size_t | write (const uint8_t *buffer, size_t size) override |
Write multiple bytes to the file. More... | |
size_t | write (int t) |
Write an int value as a byte. More... | |
size_t | write (int8_t c) |
Write a signed byte as an unsigned byte. More... | |
size_t | write (long long t) |
Write a long long value as a byte. More... | |
size_t | write (long t) |
Write a long value as a byte. More... | |
size_t | write (short t) |
Write a short value as a byte. More... | |
size_t | write (uint8_t b) override |
Write a single byte to the file. More... | |
size_t | write (unsigned int t) |
Write an unsigned int value as a byte. More... | |
size_t | write (unsigned long long t) |
Write an unsigned long long value as a byte. More... | |
size_t | write (unsigned long t) |
Write an unsigned long value as a byte. More... | |
size_t | write (unsigned short t) |
Write an unsigned short value as a byte. More... | |
Static Public Attributes | |
static constexpr int | temporaryStackBufferSize = 64 |
Size of temporary stack buffer for stream transfers. | |
Protected Member Functions | |
float | parseFloat (char skipChar) |
Parse a float with custom skip character. More... | |
long | parseInt (char skipChar) |
Parse an integer with custom skip character. More... | |
int | peekNextDigit (bool detectDecimal=false) |
Peek at the next digit in the stream. More... | |
size_t | sendGeneric (Print *to, const ssize_t len=-1, const int readUntilChar=-1, oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Generic transfer method for Print objects (deprecated) More... | |
size_t | sendGeneric (Stream *to, const ssize_t len=-1, const int readUntilChar=-1, oneShotMs::timeType timeoutMs=oneShotMs::neverExpires) |
Generic transfer method for Stream objects. More... | |
size_t | SendGenericPeekBuffer (Print *to, const ssize_t len, const int readUntilChar, const oneShotMs::timeType timeoutMs) |
Transfer using peek buffer API. More... | |
size_t | SendGenericRegular (Print *to, const ssize_t len, const oneShotMs::timeType timeoutMs) |
Transfer using regular read. More... | |
size_t | SendGenericRegularUntil (Print *to, const ssize_t len, const int readUntilChar, const oneShotMs::timeType timeoutMs) |
Transfer using regular read until character. More... | |
void | setReport (Report report) |
Set the result of a send operation. More... | |
void | setWriteError (int err=1) |
Set the write error flag. More... | |
int | timedPeek () |
Peek at the next character with timeout. More... | |
int | timedRead () |
Read a character with timeout. More... | |
Protected Attributes | |
unsigned long | _startMillis |
Used for timeout measurement. | |
unsigned long | _timeout = 1000 |
Number of milliseconds to wait for the next char before aborting timed read. | |
A file-like interface for vector-backed storage in memory.
This class provides a file-like interface (compatible with Arduino's Stream) for reading and writing data to vector-backed storage. It can use either standard PSRAM or ESP32's HIMEM (high memory beyond the 4MB boundary) as its underlying storage mechanism through the VectorPSRAM and VectorHIMEM implementations.
InMemoryFile offers familiar file operations like open, close, read, write, seek, and truncate while managing the data in memory rather than on disk. This makes it useful for temporary storage, data processing, or situations where file operations are needed but filesystem access is not available or desirable.
The class can either manage its own internal vector or reference an external vector supplied by another component (like PSRAMClass or HIMEMClass).
VectorType | The vector implementation to use for storage (typically VectorPSRAM<uint8_t> or VectorHIMEM<uint8_t>) |
|
stronginherited |
|
inline |
Constructor with filename and mode.
filename | Name of the file |
mode | Mode to open the file in |
|
inlineoverridevirtual |
|
inlinevirtualinherited |
Get the number of bytes available in the write buffer.
Reimplemented in esp32_psram::RingBufferStream< VectorType >.
|
inline |
Get the number of bytes that can be held in current storage. Please note that this might dynamically grow!
|
inlineinherited |
Search for a single character in the stream.
target | Character to search for |
|
inherited |
Search for a string in the stream.
target | The string to search for |
|
inherited |
Search for a string of given length in the stream.
target | The string to search for |
length | Length of the target string |
|
inlineinherited |
Search for a string of given length in the stream (uint8_t variant)
target | The string to search for |
length | Length of the target string |
|
inlineinherited |
Search for a string in the stream (uint8_t variant)
target | The string to search for |
|
inherited |
Search for a string until a terminator is found.
target | The string to search for |
terminator | String that terminates the search |
|
inherited |
Search for a string of given length until a terminator is found.
target | The string to search for |
targetLen | Length of the target string |
terminate | String that terminates the search |
termLen | Length of the terminator string |
|
inlineinherited |
Search for a string until a terminator is found (uint8_t variant)
target | The string to search for |
terminator | String that terminates the search |
|
inlineinherited |
Search for a string of given length until a terminator is found (uint8_t variant)
target | The string to search for |
targetLen | Length of the target string |
terminate | String that terminates the search |
termLen | Length of the terminator string |
|
inlineinherited |
Get the result of the last send operation.
|
inlineinherited |
Get the current timeout setting.
|
inlineinherited |
Get the current write error state.
|
inlinevirtualinherited |
Check if this stream implements the peek buffer API.
|
inlinevirtualinherited |
Check if input operations can timeout.
|
inline |
Check if file is open.
|
inline |
Get the name of the file.
|
inline |
Open the file with the specified mode.
mode | Mode to open the file in |
|
inlinevirtualinherited |
Check if the output can timeout.
By default, write operations can timeout (like for network or serial). Child classes can override this to false (like String).
|
inherited |
Parse a float from the stream.
|
protectedinherited |
Parse a float with custom skip character.
skipChar | Character to ignore during parsing |
|
inherited |
Parse an integer from the stream.
|
protectedinherited |
Parse an integer with custom skip character.
skipChar | Character to ignore during parsing |
|
inlineoverridevirtual |
Peek at the next byte without advancing the position.
Implements Stream.
|
inlinevirtualinherited |
Get the number of bytes available in the peek buffer.
|
inlinevirtualinherited |
Get a pointer to the peek buffer.
|
inlinevirtualinherited |
Consume bytes from the peek buffer.
consume | Number of bytes to consume |
|
protectedinherited |
Peek at the next digit in the stream.
detectDecimal | Whether to consider decimal points as valid parts of numbers |
|
inline |
Get the current position in the file.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Print a floating point value.
n | Value to print |
digits | Number of decimal places to display (default: 2) |
|
inherited |
Print an integer value.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print a long long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print a long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned byte value.
b | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned integer value.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned long long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print formatted data (printf style)
format | Format string |
... | Variable arguments for format string |
|
inherited |
Print formatted data from program memory (printf style)
format | Format string in program memory |
... | Variable arguments for format string |
|
inherited |
Print a single character followed by a newline.
c | Character to print |
|
inherited |
Print a flash string followed by a newline.
str | Flash string to print |
|
inherited |
Print a null-terminated string followed by a newline.
str | String to print |
|
inherited |
Print a Printable object followed by a newline.
obj | Object to print |
|
inherited |
Print a String object followed by a newline.
s | String to print |
|
inherited |
Print a floating point value followed by a newline.
n | Value to print |
digits | Number of decimal places to display (default: 2) |
|
inherited |
Print an integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print a long long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print a long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned byte value followed by a newline.
b | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned long long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print an unsigned long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
|
inherited |
Print just a newline.
|
inherited |
Specialized template for printing floating point numbers.
number | The floating point number to print |
digits | The number of decimal places to display |
|
inlineoverridevirtual |
Read a single byte from the file.
Implements Stream.
|
inlineinherited |
Read multiple bytes from the stream (char variant)
buffer | Buffer to store the data |
len | Maximum number of bytes to read |
|
virtualinherited |
Read multiple bytes from the stream.
buffer | Buffer to store the data |
len | Maximum number of bytes to read |
|
inlineoverridevirtual |
Read multiple bytes from the file.
buffer | Buffer to store the read data |
size | Maximum number of bytes to read |
Reimplemented from Stream.
|
inlinevirtualinherited |
Read bytes from the stream into a buffer (uint8_t variant)
buffer | Buffer to store the data |
length | Maximum number of bytes to read |
Reimplemented in esp32_psram::RingBufferStream< VectorType >.
|
inherited |
Read bytes until a terminator character is found.
terminator | Character that terminates the read |
buffer | Buffer to store the data |
length | Maximum number of bytes to read |
|
inlineinherited |
Read bytes until a terminator character is found (uint8_t variant)
terminator | Character that terminates the read |
buffer | Buffer to store the data |
length | Maximum number of bytes to read |
|
virtualinherited |
Read a string from the stream.
|
inherited |
Read a string until a terminator character is found.
terminator | Character that terminates the read |
|
inherited |
Read a string until a terminator string is found a specific number of times.
terminator | String that terminates the read |
untilTotalNumberOfOccurrences | Number of times the terminator must be found |
|
inline |
Reserve storage.
new_cap | The new capacity of the file |
|
inline |
Set the current position in the file.
pos | The position to seek to |
|
inlineinherited |
Transfer all data with timeout (deprecated)
to | Destination stream |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer all data with timeout (deprecated)
to | Destination stream |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer all data with timeout.
to | Destination stream |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer all data with timeout.
to | Destination stream |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer all data with timeout.
to | Destination stream |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer available data without waiting (deprecated)
to | Destination stream |
|
inlineinherited |
Transfer available data without waiting (deprecated)
to | Destination stream |
|
inlineinherited |
Transfer available data without waiting.
to | Destination stream |
|
inlineinherited |
Transfer available data without waiting.
to | Destination stream |
|
inlineinherited |
Transfer available data without waiting.
to | Destination stream |
|
protectedinherited |
Generic transfer method for Print objects (deprecated)
to | Destination stream |
len | Maximum number of bytes to transfer (-1 for unlimited) |
readUntilChar | Character to stop at (-1 for none) |
timeoutMs | Timeout in milliseconds |
|
protectedinherited |
Generic transfer method for Stream objects.
to | Destination stream |
len | Maximum number of bytes to transfer (-1 for unlimited) |
readUntilChar | Character to stop at (-1 for none) |
timeoutMs | Timeout in milliseconds |
|
protectedinherited |
Transfer using peek buffer API.
to | Destination stream |
len | Maximum number of bytes to transfer |
readUntilChar | Character to stop at |
timeoutMs | Timeout in milliseconds |
|
protectedinherited |
Transfer using regular read.
to | Destination stream |
len | Maximum number of bytes to transfer |
timeoutMs | Timeout in milliseconds |
|
protectedinherited |
Transfer using regular read until character.
to | Destination stream |
len | Maximum number of bytes to transfer |
readUntilChar | Character to stop at |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer a specific amount of data with timeout (deprecated)
to | Destination stream |
maxLen | Maximum number of bytes to transfer |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer a specific amount of data with timeout (deprecated)
to | Destination stream |
maxLen | Maximum number of bytes to transfer |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer a specific amount of data with timeout.
to | Destination stream |
maxLen | Maximum number of bytes to transfer |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer a specific amount of data with timeout.
to | Destination stream |
maxLen | Maximum number of bytes to transfer |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer a specific amount of data with timeout.
to | Destination stream |
maxLen | Maximum number of bytes to transfer |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer data until a specific character is found (deprecated)
to | Destination stream |
readUntilChar | Character to stop at |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer data until a specific character is found (deprecated)
to | Destination stream |
readUntilChar | Character to stop at |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer data until a specific character is found.
to | Destination stream |
readUntilChar | Character to stop at (the character is read but not transferred) |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer data until a specific character is found.
to | Destination stream |
readUntilChar | Character to stop at (the character is read but not transferred) |
timeoutMs | Timeout in milliseconds |
|
inlineinherited |
Transfer data until a specific character is found.
to | Destination stream |
readUntilChar | Character to stop at (the character is read but not transferred) |
timeoutMs | Timeout in milliseconds |
|
inline |
Set the name of this file.
name | The name to set |
|
inlineprotectedinherited |
Set the result of a send operation.
report | Status code to set |
|
inherited |
Set the timeout for stream operations.
timeout | Maximum milliseconds to wait for stream data |
|
inline |
Set the vector to use for this file.
vec | Pointer to the vector to use |
|
inlineprotectedinherited |
Set the write error flag.
err | Error code to set (default: 1) |
|
inline |
Get the size of the file.
|
inlinevirtualinherited |
Get the number of bytes remaining in the stream.
|
protectedinherited |
Peek at the next character with timeout.
|
protectedinherited |
Read a character with timeout.
|
inlineinherited |
Write a char value as a byte.
c | Character to write |
|
inlineinherited |
Write a buffer of characters to the output.
buffer | Pointer to the character buffer |
size | Number of characters to write |
|
inlineinherited |
Write a null-terminated string to the output.
str | Pointer to the string to write |
|
inlineoverridevirtual |
Write multiple bytes to the file.
buffer | Buffer containing the data to write |
size | Number of bytes to write |
Reimplemented from Print.
|
inlineinherited |
Write an int value as a byte.
t | Value to write |
|
inlineinherited |
Write a signed byte as an unsigned byte.
c | Byte to write |
|
inlineinherited |
Write a long long value as a byte.
t | Value to write |
|
inlineinherited |
Write a long value as a byte.
t | Value to write |
|
inlineinherited |
Write a short value as a byte.
t | Value to write |
|
inlineoverridevirtual |
Write a single byte to the file.
b | The byte to write |
Implements Print.
|
inlineinherited |
Write an unsigned int value as a byte.
t | Value to write |
|
inlineinherited |
Write an unsigned long long value as a byte.
t | Value to write |
|
inlineinherited |
Write an unsigned long value as a byte.
t | Value to write |
|
inlineinherited |
Write an unsigned short value as a byte.
t | Value to write |