Struct BufferedStream
Random access stream that provides buffering on top of a wrapped stream.
struct BufferedStream(S)
;
The source stream is logically split up into chunks of equal size, where a defined maximum number of those chunks can be cached in memory. Cached chunks are managed using a LRU strategy.
Constructors
Name | Description |
---|---|
this
(stream, buffer_size, buffer_count)
|
Fields
Name | Type | Description |
---|---|---|
m_state
|
BufferedStream |
Properties
Name | Type | Description |
---|---|---|
dataAvailableForRead [get]
|
bool | |
empty [get]
|
bool | |
isOpen [get]
|
bool | |
leastSize [get]
|
ulong | |
readable [get]
|
bool | |
size [get]
|
ulong | |
underlying [get]
|
inout(S) | |
writable [get]
|
bool |
Methods
Name | Description |
---|---|
close
()
|
|
finalize
()
|
|
flush
()
|
|
peek
()
|
|
read
(dst, mode)
|
|
read
(dst)
|
|
seek
(offset)
|
|
state
()
|
|
sync
()
|
Flushes and releases all buffers and updates the buffer size. |
tell
()
|
|
truncate
(size)
|
|
write
(bytes, mode)
|
|
write
(bytes)
|
|
write
(bytes)
|
Inner structs
Name | Description |
---|---|
State
|