Constructs an InputStreamReader out of a given inputStream
.
Constructs an InputStreamReader out of a given inputStream
. The resulting Reader
emits chunks of at most chunkSize
.
Discards this Reader and closes the underlying InputStream
Discards this Reader and closes the underlying InputStream
Close the resource with the given timeout.
Close the resource with the given timeout. This timeout is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.
Close the resource.
Close the resource. The returned Future is completed when the resource has been fully relinquished.
closeAwaitably is intended to be used as a wrapper for
close
.
closeAwaitably is intended to be used as a wrapper for
close
. The underlying f
will be called at most once.
Discard this reader: its output is no longer required.
Discard this reader: its output is no longer required.
This asynchronously closes the underlying InputStream
.
Construct a new Reader by applying f
to every item read from this Reader
Construct a new Reader by applying f
to every item read from this Reader
the function constructs a new Reader[B] from the value of this Reader.read
All operations of the new Reader will be in sync with self Reader. Discarding one Reader will discard the other Reader. When one Reader's onClose resolves, the other Reader's onClose will be resolved immediately with the same value.
Converts a Reader[Reader[B]]
into a Reader[B]
Converts a Reader[Reader[B]]
into a Reader[B]
Is this Awaitable ready? In other words: would calling Awaitable.ready block?
Is this Awaitable ready? In other words: would calling Awaitable.ready block?
Construct a new Reader by applying f
to every item read from this Reader
Construct a new Reader by applying f
to every item read from this Reader
the function transforms data of type A to B
All operations of the new Reader will be in sync with self Reader. Discarding one Reader will discard the other Reader. When one Reader's onClose resolves, the other Reader's onClose will be resolved immediately with the same value.
A Future that resolves once this reader is closed upon reading of end-of-stream.
A Future that resolves once this reader is closed upon reading of end-of-stream.
If the result is a failed future, this indicates that it was not closed either by reading until the end of the stream nor by discarding. This is useful for any extra resource cleanup that you must do once the stream is no longer being used.
Asynchronously read at most min(n
, maxBufferSize
) bytes from
the InputStream
.
Asynchronously read at most min(n
, maxBufferSize
) bytes from
the InputStream
. The returned Future represents the results of
the read operation. Any failure indicates an error; an empty buffer
indicates that the stream has completed.
the underlying InputStream
is closed on read of EOF.
Support for Await.ready
.
Support for Await.ready
. The use of the implicit permit is an
access control mechanism: only Await.ready
may call this
method.
Support for Await.result
.
Support for Await.result
. The use of the implicit permit is an
access control mechanism: only Await.result
may call this
method.
Provides the Reader API for an
InputStream
.The given
InputStream
will be closed when Reader.read reaches the EOF or a call to discard() or close().