object Buffer
- Source
- bufferMod.scala
- Alphabetic
- By Inheritance
- Buffer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val ^: Any
- Annotations
- @JSGlobal("Buffer") @native()
- def alloc(size: Double, fill: Unit, encoding: BufferEncoding): Buffer
- Annotations
- @inline()
- def alloc(size: Double, fill: Double, encoding: BufferEncoding): Buffer
- Annotations
- @inline()
- def alloc(size: Double, fill: Double): Buffer
- Annotations
- @inline()
- def alloc(size: Double, fill: java.lang.String, encoding: BufferEncoding): Buffer
- Annotations
- @inline()
- def alloc(size: Double, fill: java.lang.String): Buffer
- Annotations
- @inline()
- def alloc(size: Double, fill: Buffer, encoding: BufferEncoding): Buffer
- Annotations
- @inline()
- def alloc(size: Double, fill: Buffer): Buffer
- Annotations
- @inline()
- def alloc(size: Double): Buffer
Allocates a new buffer of {size} octets.
Allocates a new buffer of {size} octets.
- size
count of octets to allocate.
- Annotations
- @inline()
- def allocUnsafe(size: Double): Buffer
Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.
Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.
- size
count of octets to allocate
- Annotations
- @inline()
- def allocUnsafeSlow(size: Double): Buffer
Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.
Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.
- size
count of octets to allocate
- Annotations
- @inline()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def byteLength(string: ArrayBuffer, encoding: BufferEncoding): Double
- Annotations
- @inline()
- def byteLength(string: ArrayBuffer): Double
- Annotations
- @inline()
- def byteLength(string: java.lang.String, encoding: BufferEncoding): Double
- Annotations
- @inline()
- def byteLength(string: java.lang.String): Double
Gives the actual byte length of a string.
Gives the actual byte length of a string. encoding defaults to 'utf8'. This is not the same as String.prototype.length since that returns the number of characters in a string.
- string
string to test.
- Annotations
- @inline()
- def byteLength(string: SharedArrayBuffer, encoding: BufferEncoding): Double
- Annotations
- @inline()
- def byteLength(string: SharedArrayBuffer): Double
- Annotations
- @inline()
- def byteLength(string: ArrayBufferView, encoding: BufferEncoding): Double
- Annotations
- @inline()
- def byteLength(string: ArrayBufferView): Double
- Annotations
- @inline()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def compare(buf1: Uint8Array, buf2: Uint8Array): Double
The same as buf1.compare(buf2).
The same as buf1.compare(buf2).
- Annotations
- @inline()
- def concat(list: Array[Uint8Array], totalLength: Double): Buffer
- Annotations
- @inline()
- def concat(list: Array[Uint8Array]): Buffer
Returns a buffer which is the result of concatenating all the buffers in the list together.
Returns a buffer which is the result of concatenating all the buffers in the list together.
If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. If the list has exactly one item, then the first item of the list is returned. If the list has more than one item, then a new Buffer is created.
- list
An array of Buffer objects to concatenate
- Annotations
- @inline()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def from(str: WithImplicitCoercion[java.lang.String], encoding: BufferEncoding): Buffer
- Annotations
- @inline()
- def from(str: ToPrimitive, encoding: BufferEncoding): Buffer
- Annotations
- @inline()
- def from(str: ToPrimitive): Buffer
- Annotations
- @inline()
- def from(data: Uint8Array): Buffer
Creates a new Buffer using the passed {data}
Creates a new Buffer using the passed {data}
- data
data to create a new Buffer
- Annotations
- @inline()
- def from(data: Array[Double]): Buffer
- Annotations
- @inline()
- def from(arrayBuffer: WithImplicitCoercion[|[ArrayBuffer, SharedArrayBuffer]], byteOffset: Unit, length: Double): Buffer
- Annotations
- @inline()
- def from(arrayBuffer: WithImplicitCoercion[|[ArrayBuffer, SharedArrayBuffer]], byteOffset: Double, length: Double): Buffer
- Annotations
- @inline()
- def from(arrayBuffer: WithImplicitCoercion[|[ArrayBuffer, SharedArrayBuffer]], byteOffset: Double): Buffer
- Annotations
- @inline()
- def from(arrayBuffer: WithImplicitCoercion[|[|[|[|[Array[Double], ArrayBuffer], SharedArrayBuffer], java.lang.String], Uint8Array]]): Buffer
Creates a new Buffer containing the given JavaScript string {str}.
Creates a new Buffer containing the given JavaScript string {str}. If provided, the {encoding} parameter identifies the character encoding. If not provided, {encoding} defaults to 'utf8'.
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def isBuffer(obj: Any): Boolean
Returns true if {obj} is a Buffer
Returns true if {obj} is a Buffer
- obj
object to test.
- Annotations
- @inline()
- def isEncoding(encoding: java.lang.String): Boolean
Returns true if {encoding} is a valid encoding argument.
Returns true if {encoding} is a valid encoding argument. Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
- encoding
string to test.
- Annotations
- @inline()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def of(items: Double*): Buffer
Creates a new Buffer using the passed {data}
Creates a new Buffer using the passed {data}
- Annotations
- @inline()
- def poolSize: Double
This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling.
This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
- Annotations
- @JSGlobal("Buffer.poolSize") @native()
- def poolSize_=(x: Double): Unit
- Annotations
- @inline()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated