@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="ReadableStream")
public class ReadableStream
extends java.lang.Object
implements Transferable
| Constructor and Description |
|---|
ReadableStream()
The ReadableStream() constructor creates and returns a readable stream object from the given handlers.
|
ReadableStream(java.lang.Object underlyingSource)
The ReadableStream() constructor creates and returns a readable stream object from the given handlers.
|
ReadableStream(java.lang.Object underlyingSource,
QueuingStrategy strategy)
The ReadableStream() constructor creates and returns a readable stream object from the given handlers.
|
| Modifier and Type | Method and Description |
|---|---|
Promise<java.lang.Void> |
cancel()
The cancel() method of the ReadableStream interface cancels the associated stream.
|
Promise<java.lang.Void> |
cancel(java.lang.Object reason)
The cancel() method of the ReadableStream interface cancels the associated stream.
|
ReadableStreamReader |
getReader()
The getReader() method of the ReadableStream interface creates a reader and locks the stream to it.
|
ReadableStreamReader |
getReader(ReadableStreamGetReaderOptions options)
The getReader() method of the ReadableStream interface creates a reader and locks the stream to it.
|
boolean |
locked()
The locked read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
|
ReadableStream |
pipeThrough(ReadableWritablePair transform)
The pipeThrough() method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
|
ReadableStream |
pipeThrough(ReadableWritablePair transform,
StreamPipeOptions options)
The pipeThrough() method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
|
Promise<java.lang.Void> |
pipeTo(WritableStream destination)
The pipeTo() method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
Promise<java.lang.Void> |
pipeTo(WritableStream destination,
StreamPipeOptions options)
The pipeTo() method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
JsArray<ReadableStream> |
tee()
The tee() method of the ReadableStream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new ReadableStream instances.
|
public ReadableStream(@Nonnull
java.lang.Object underlyingSource,
@Nonnull
QueuingStrategy strategy)
public ReadableStream(@Nonnull
java.lang.Object underlyingSource)
public ReadableStream()
@JsProperty(name="locked") public boolean locked()
@Nonnull public Promise<java.lang.Void> cancel(@Nullable java.lang.Object reason)
@Nonnull public Promise<java.lang.Void> cancel()
@Nonnull public ReadableStreamReader getReader(@Nonnull ReadableStreamGetReaderOptions options)
@Nonnull public ReadableStreamReader getReader()
@Nonnull public ReadableStream pipeThrough(@Nonnull ReadableWritablePair transform, @Nonnull StreamPipeOptions options)
@Nonnull public ReadableStream pipeThrough(@Nonnull ReadableWritablePair transform)
@Nonnull public Promise<java.lang.Void> pipeTo(@Nonnull WritableStream destination, @Nonnull StreamPipeOptions options)
@Nonnull public Promise<java.lang.Void> pipeTo(@Nonnull WritableStream destination)
@Nonnull public JsArray<ReadableStream> tee()