Class

org.scalajs.dom.experimental

ReadableStreamReader

Related Doc: package experimental

Permalink

class ReadableStreamReader[+T] extends Object

See ¶3.4. Class ReadableStreamReader of whatwg streams spec.

The ReadableStreamReader class represents a readable stream reader designed to be vended [sic] by a ReadableStream instance.

The ReadableStreamReader constructor is generally not meant to be used directly; instead, a stream’s getReader() method should be used. This allows different classes of readable streams to vend different classes of readers without the consumer needing to know which goes with which.

T

Type of the Chunks returned by the Stream

Annotations
@RawJSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ReadableStreamReader
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ReadableStreamReader(stream: ReadableStream[T])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cancel(reason: Any): Promise[Any]

    Permalink

    See §3.4.4.2. cancel(reason) of whatwg Streams spec.

    See §3.4.4.2. cancel(reason) of whatwg Streams spec.

    If the reader is active, the cancel method behaves the same as that for the associated stream. When done, it automatically releases the lock.

    //todo determine type of reason

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def closed: Promise[ReadableStreamReader[T]]

    Permalink

    See §3.4.4.1. get closed of whatwg Streams spec.

    See §3.4.4.1. get closed of whatwg Streams spec.

    The closed getter returns a promise that will be fulfilled when the stream becomes closed or the reader’s lock is released, or rejected if the stream ever errors.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  20. def read(): Promise[Chunk[T]]

    Permalink

    See 3.4.4.3. read() of whatwg Stream spec.

    See 3.4.4.3. read() of whatwg Stream spec.

    The read method will return a promise that allows access to the next chunk from the stream’s internal queue, if available. If the chunk does become available, the promise will be fulfilled with an object of the form { value: theChunk, done: false }. If the stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }. If the stream becomes errored, the promise will be rejected with the relevant error. If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.

  21. def releaseLock(): Unit

    Permalink

    The releaseLock method releases the reader’s lock on the corresponding stream.

    The releaseLock method releases the reader’s lock on the corresponding stream. After the lock is released, the reader is no longer active. If the associated stream is errored when the lock is released, the reader will appear errored in the same way from now on; otherwise, the reader will appear closed. A reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s read() method has not yet been settled. Attempting to do so will throw a TypeError and leave the reader locked to the stream.

    throws scala.scalajs.js.TypeError

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped