gmime.stream

Module for [Stream] class

Types 3

Abstract I/O stream class.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Stream self() nothrowReturns `this`, for use in `with` statements.
StreamGidBuilder builder() static nothrowGet builder for [gmime.stream.Stream] Returns: New builder object
ptrdiff_t bufferGets(ubyte[] buf) nothrowReads in at most one less than max characters from stream and stores them into the buffer pointed to by buf. Reading stops after an EOS or newline ('\n'). If a newline is read, it is stored into th...
void bufferReadln(ubyte[] buffer) nothrowReads a single line into buffer.
int close() nothrowCloses the stream. Returns: `0` on success or %-1 on fail.
void construct(long start, long end) nothrowInitializes a new stream with bounds start and end.
bool eos() nothrowTests the end-of-stream indicator for stream. Returns: true on EOS or false otherwise.
int flush() nothrowSync's the stream to disk. Returns: `0` on success or %-1 on fail.
long length() nothrowGets the length of the stream. Returns: the length of the stream or %-1 if unknown.
ptrdiff_t read(ubyte[] buf) nothrowAttempts to read up to len bytes from stream into buf.
int reset() nothrowResets the stream. Returns: `0` on success or %-1 on fail.
long seek(long offset, gmime.types.SeekWhence whence) nothrowRepositions the offset of the stream stream to the argument offset according to the directive whence as follows:
void setBounds(long start, long end) nothrowSet the bounds on a stream.
gmime.stream.Stream substream(long start, long end) nothrowCreates a new substream of stream with bounds start and end.
long tell() nothrowGets the current offset within the stream. Returns: the current position within the stream or %-1 on fail.
ptrdiff_t write(ubyte[] buf) nothrowAttempts to write up to len bytes of buf to stream.
ptrdiff_t writeString(string str) nothrowWrites string to stream.
long writeToStream(gmime.stream.Stream dest) nothrowAttempts to write the source stream to the destination stream.
long writev(gmime.types.StreamIOVector[] vector) nothrowWrites at most count blocks described by vector to stream.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gmime.stream.Stream

Fluent builder for gmime.stream.Stream

Methods
Stream build() nothrowCreate object from builder. Returns: New object