SliceStream

This subclass slices off a portion of another stream, making seeking relative to the boundaries of the slice.

It could be used to section a large file into a set of smaller files, such as with tar archives. Reading and writing a SliceStream does not modify the position of the source stream if it is seekable.

Constructors

this
this(Stream s, ulong low)

Indicate both the source stream to use for reading from and the low part of the slice.

this
this(Stream s, ulong low, ulong high)

Indicate the high index as well.

Members

Functions

readBlock
size_t readBlock(void* buffer, size_t size)
Undocumented in source. Be warned that the author may not have intended to support it.
seek
ulong seek(long offset, SeekPos rel)
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.

Properties

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

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