Packages

c

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
@JSType() @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
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. 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.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  20. 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.

  21. 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

  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toLocaleString(): String
    Definition Classes
    Object
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. def valueOf(): Any
    Definition Classes
    Object
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped