GreedyInput

A conduit filter that ensures its input is read in full. There's also an optional readExact() for more explicit requests.

Constructors

this
this(InputStream stream)

Propagate ctor to superclass.

Members

Functions

read
size_t read(void[] dst)

Fill the provided array. Returns the number of bytes actually read, which will be less that dst.length when Eof has been reached, and then Eof thereafter.

readExact
GreedyInput readExact(void[] dst)

Read from a stream into a target array. The provided dst will be fully populated with content from the input.

Inherited Members

From InputFilter

source
InputStream source;
Undocumented in source.
conduit
IConduit conduit [@property getter]

Return the hosting conduit.

read
size_t read(void[] dst)

Read from conduit into a target array. The provided dst will be populated with content from the conduit.

load
void[] load(size_t max)

Load the bits from a stream, and return them all in an array. The dst array can be provided as an option, which will be expanded as necessary to consume the input.

flush
IOStream flush()

Clear any buffered content.

seek
long seek(long offset, Anchor anchor)

Seek on this stream. Target conduits that don't support seeking will throw an IOException.

input
InputStream input [@property getter]

Return the upstream host of this filter.

close
void close()

Close the input.

Meta