7 #include <picofuse/sys.h> 14 #define NXStreamEnd SYS_IOSTREAM_EOF 40 sys_iostream_t *_stream;
58 + (
id)streamWithCapacity:(
size_t)capacity;
66 + (
id)streamWithBytes:(
const void *)bytes length:(size_t)length;
94 - (
id)initWithCapacity:(
size_t)capacity;
99 - (
id)initWithBytes:(
const void *)bytes length:(size_t)length;
105 - (
id)initWithStream:(sys_iostream_t *)stream;
119 - (size_t)readBytes:(
void *)bytes length:(size_t)length;
128 - (
NXString *)readStringWithLength:(
size_t)length;
135 - (size_t)writeBytes:(
const void *)bytes length:(size_t)length;
141 - (size_t)writeString:(
NXString *)string;
160 - (size_t)hashWithAlgorithm:(
NXHashAlgorithm)algorithm bytes:(
void *)bytes;
176 - (
BOOL)seek:(ptrdiff_t)offset relative:(
BOOL)relative;
A stream of bytes, which can be read or written.
Defines the NXHashAlgorithm type, for algorithms which hash data.
BOOL isClosed()
Returns YES if the stream has been closed.
BOOL isEnded()
Returns YES if there'll never be anything else to read, as when a network connection has been closed...
NXHashAlgorithm
Algorithms which hash data.
NXStream * standardInput()
Returns a stream for the standard input, or nil if there isn't one.
bool BOOL
A Boolean value.
void close()
Closes the stream, which can't be used after that.
The base class for objects in the Foundation framework.
size_t position()
Returns the position from the start, or NXNotFound if the stream doesn't have one.
struct objc_object * id
A pointer to an instance of a class.
NXStream * standardOutput()
Returns a stream for the standard output, or nil if there isn't one.
Bytes, which can be added to.
int peek()
Returns the next byte, without reading it, or NXStreamEnd if there isn't one at present.