creates a new read-only stream that reads data from the underlying stream
string is encountered, after which
If the boundary string does not appear in the underlying stream input,
the entire input is passed through unaltered.
When the boundary string appears, the last character readable from the
newly created boundary stream will be the character just before the first
character of the boundary string.
Therefore, the boundary string itself does not appear in the input
from the boundary stream.
In no case are any characters beyond the last character of the boundary
string read out from the underlying stream, i.e.,
the last character read from the underlying stream will be
the last character of the boundary string.
The boundary matching algorithm runs in linear time.
string is limited to 255 characters in length (not counting the
terminating \0 byte).
should be used to close the returned stream.
parameter determines whether the underlying stream
is also closed when the boundary stream is closed.
Boundary streams are useful for online parsing of multipart
MIME document body parts as defined in RFC 2046.