org.scalajs.dom.experimental

ReadableStreamReader

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() @JSGlobal()
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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

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

    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

  8. def clone(): AnyRef

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

    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.

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

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

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

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

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

    Definition Classes
    Object
  15. def hashCode(): Int

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

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

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

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

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

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

    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.

  23. def releaseLock(): Unit

    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

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

    Definition Classes
    AnyRef
  25. def toLocaleString(): String

    Definition Classes
    Object
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. def valueOf(): Any

    Definition Classes
    Object
  28. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped