Packages

  • package root
    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package scalajs
    Definition Classes
    scala
  • package js

    Types, methods and values for interoperability with JavaScript libraries.

    Types, methods and values for interoperability with JavaScript libraries.

    This package is only relevant to the Scala.js compiler, and should not be referenced by any project compiled to the JVM.

    Guide

    General documentation on Scala.js is available at http://www.scala-js.org/doc/.

    Overview

    The trait js.Any is the root of the hierarchy of JavaScript types. This package defines important subtypes of js.Any that are defined in the standard library of ECMAScript 5.1 (or ES 6, with a label in the documentation), such as js.Object, js.Array and js.RegExp.

    Implicit conversions to and from standard Scala types to their equivalent in JavaScript are provided. For example, from Scala functions to JavaScript functions and back.

    The most important subtypes of js.Any declared in this package are:

    The trait js.Dynamic is a special subtrait of js.Any. It can represent any JavaScript value in a dynamically-typed way. It is possible to call any method and read and write any field of a value of type js.Dynamic.

    There are no explicit definitions for JavaScript primitive types, as one could expect, because the corresponding Scala types stand in their stead:

    • Boolean is the type of primitive JavaScript booleans
    • Double is the type of primitive JavaScript numbers
    • String is the type of primitive JavaScript strings (or null)
    • Unit is the type of the JavaScript undefined value
    • Null is the type of the JavaScript null value

    js.UndefOr gives a scala.Option-like interface where the JavaScript value undefined takes the role of None.

    A | B is an unboxed pseudo-union type, suitable to type values that admit several unrelated types in facade types.

    Definition Classes
    scalajs
  • package typedarray

    ECMAScript 6 The typdearray package provides facade types for JavaScript ArrayBuffer, TypeArrays and DataView.

    ECMAScript 6 The typdearray package provides facade types for JavaScript ArrayBuffer, TypeArrays and DataView. Further, it provides conversions between primitive Scala arrays and TypedArrays

    Definition Classes
    js
  • AB2TA
  • AC2TA
  • AD2TA
  • AF2TA
  • AI2TA
  • AS2TA
  • ArrayBuffer
  • ArrayBufferInputStream
  • ArrayBufferView
  • DataView
  • DataViewExt
  • Float32Array
  • Float64Array
  • Int16Array
  • Int32Array
  • Int8Array
  • TA2AB
  • TA2AC
  • TA2AD
  • TA2AF
  • TA2AI
  • TA2AS
  • TypedArray
  • TypedArrayBuffer
  • TypedArrayBufferOps
  • TypedArrayStatic
  • Uint16Array
  • Uint32Array
  • Uint8Array
  • Uint8ClampedArray
c

scala.scalajs.js.typedarray

ArrayBufferInputStream

class ArrayBufferInputStream extends InputStream

ECMAScript 6 A java.io.InputStream wrapping a JavaScript ArrayBuffer

This class is extremely similar to a ByteArrayInputStream, but uses ArrayBuffers as the underlying representation. Stream implementations may special case on this stream for better performance and access the underlying buffer directly. (They still need to make sure the internal pointers are properly aligned though).

This stream has several public members (n.b. buffer, offset, length and pos) in order to allow JavaScript aware applications to special case on this kind of stream and access the underlying ArrayBuffer directly for efficiency. In this case it is the client's responsibility to synchronize pos, as if the stream were read normally (if the context in which it is used requires this).

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ArrayBufferInputStream
  2. InputStream
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ArrayBufferInputStream(buffer: ArrayBuffer)

    Convenience constructor.

    Convenience constructor. Strictly equivalent to {{new ArrayBufferInputStream(buffer, 0, buffer.byteLength)}

  2. new ArrayBufferInputStream(buffer: ArrayBuffer, offset: Int, length: Int)

    buffer

    Underlying ArrayBuffer

    offset

    Offset in bytes in buffer

    length

    Length in bytes in buffer

Value Members

  1. final def !=(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toany2stringadd[ArrayBufferInputStream] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ArrayBufferInputStream, B)
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toArrowAssoc[ArrayBufferInputStream] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def available(): Int
    Definition Classes
    ArrayBufferInputStream → InputStream
  8. val buffer: ArrayBuffer
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def close(): Unit
    Definition Classes
    InputStream → Closeable → AutoCloseable
    Annotations
    @throws(classOf[java.io.IOException])
  11. def ensuring(cond: (ArrayBufferInputStream) => Boolean, msg: => scala.Any): ArrayBufferInputStream
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toEnsuring[ArrayBufferInputStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (ArrayBufferInputStream) => Boolean): ArrayBufferInputStream
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toEnsuring[ArrayBufferInputStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: => scala.Any): ArrayBufferInputStream
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toEnsuring[ArrayBufferInputStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): ArrayBufferInputStream
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toEnsuring[ArrayBufferInputStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toStringFormat[ArrayBufferInputStream] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. val length: Int
  23. def mark(readlimit: Int): Unit
    Definition Classes
    ArrayBufferInputStream → InputStream
  24. var mark: Int

    Used to persist pos when mark is called

    Used to persist pos when mark is called

    Attributes
    protected
  25. def markSupported(): Boolean
    Definition Classes
    ArrayBufferInputStream → InputStream
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. val offset: Int
  30. def pos: Int

    Next byte to read in the buffer (after adding offset).

    Next byte to read in the buffer (after adding offset).

    Use skip to update (protects from overrun and moving backwards).

    Annotations
    @inline()
  31. def pos_=(x: Int): Unit
    Attributes
    protected
    Annotations
    @inline()
  32. def read(b: scala.Array[Byte], off: Int, reqLen: Int): Int
    Definition Classes
    ArrayBufferInputStream → InputStream
  33. def read(): Int
    Definition Classes
    ArrayBufferInputStream → InputStream
  34. def read(arg0: scala.Array[Byte]): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  35. def reset(): Unit
    Definition Classes
    ArrayBufferInputStream → InputStream
  36. def skip(n: Long): Long

    Skips a given number of bytes.

    Skips a given number of bytes. Always skips the maximum number possible

    Definition Classes
    ArrayBufferInputStream → InputStream
  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def [B](y: B): (ArrayBufferInputStream, B)
    Implicit
    This member is added by an implicit conversion from ArrayBufferInputStream toArrowAssoc[ArrayBufferInputStream] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from InputStream

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion any2stringadd fromArrayBufferInputStream to any2stringadd[ArrayBufferInputStream]

Inherited by implicit conversion StringFormat fromArrayBufferInputStream to StringFormat[ArrayBufferInputStream]

Inherited by implicit conversion Ensuring fromArrayBufferInputStream to Ensuring[ArrayBufferInputStream]

Inherited by implicit conversion ArrowAssoc fromArrayBufferInputStream to ArrowAssoc[ArrayBufferInputStream]

Ungrouped