BufferedStream

This subclass is for buffering a source stream.

A buffered stream must be closed explicitly to ensure the final buffer content is written to the source stream. The source stream position is changed according to the block size so reading or writing to the BufferedStream may not change the source stream position by the same amount.

Constructors

this
this(Stream source, size_t bufferSize)

Create a buffered stream for the stream source with the buffer size bufferSize.

Members

Aliases

readLine
alias readLine = Stream.readLine
Undocumented in source.
readLineW
alias readLineW = Stream.readLineW
Undocumented in source.

Functions

flush
void flush()
Undocumented in source.
readBlock
size_t readBlock(void* result, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
readLine
char[] readLine(char[] inBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
readLineW
wchar[] readLineW(wchar[] inBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
resetSource
void resetSource()
Undocumented in source. Be warned that the author may not have intended to support it.
seek
ulong seek(long offset, SeekPos whence)
Undocumented in source. Be warned that the author may not have intended to support it.
writeBlock
size_t writeBlock(void* result, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

available
size_t available [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
eof
bool eof [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
size
ulong size [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

TreadLine
template TreadLine(T)
Undocumented in source.

Variables

DefaultBufferSize
enum size_t DefaultBufferSize;
Undocumented in source.
buffer
ubyte[] buffer;
Undocumented in source.
bufferCurPos
size_t bufferCurPos;
Undocumented in source.
bufferDirty
bool bufferDirty;
Undocumented in source.
bufferLen
size_t bufferLen;
Undocumented in source.
bufferSourcePos
size_t bufferSourcePos;
Undocumented in source.
streamPos
ulong streamPos;
Undocumented in source.

Inherited Members

From FilterStream

nestClose
bool nestClose;

Property indicating when this stream closes to close the source stream as well. Defaults to true.

source
Stream source()

Get the current source stream.

source
void source(Stream s)

Set the current source stream.

resetSource
void resetSource()

Indicates the source stream changed state and that this stream should reset any readable, writeable, seekable, isopen and buffering flags.

readBlock
size_t readBlock(void* buffer, size_t size)
Undocumented in source. Be warned that the author may not have intended to support it.
writeBlock
size_t writeBlock(void* buffer, size_t size)
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
seek
ulong seek(long offset, SeekPos whence)
Undocumented in source. Be warned that the author may not have intended to support it.
available
size_t available [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta