package buffer
buffer package object
- Alphabetic
- By Inheritance
- buffer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class Buffer extends Uint8Array
- Annotations
- @RawJSType() @native() @JSImport("buffer", "Buffer")
- See also
- implicit final class BufferExtensions extends AnyVal
Buffer Extensions
- implicit final class BufferObjExtensions extends AnyVal
Buffer Extensions
Value Members
- val INSPECT_MAX_BYTES: Int
Returns the maximum number of bytes that will be returned when buf.inspect() is called.
Returns the maximum number of bytes that will be returned when buf.inspect() is called. This can be overridden by user modules. See util.inspect() for more details on buf.inspect() behavior.
Note that this is a property on the buffer module returned by require('buffer'), not on the Buffer global or a Buffer instance.
- val kMaxLength: Int
On 32-bit architectures, this value is (230)-1 (~1GB). On 64-bit architectures, this value is (231)-1 (~2GB).F Note that this is a property on the buffer module returned by require('buffer'), not on the Buffer global or a Buffer instance.
- def transcode(source: Uint8Array, fromEnc: String, toEnc: String): Buffer
Re-encodes the given
Buffer
orUint8Array
instance from one character encoding to another.Re-encodes the given
Buffer
orUint8Array
instance from one character encoding to another. Returns a newBuffer
instance.Throws if the
fromEnc
ortoEnc
specify invalid character encodings or if conversion fromfromEnc
totoEnc
is not permitted.
Encodings supported by
buffer.transcode()
are: 'ascii', 'utf8', 'utf16le', 'ucs2', 'latin1', and 'binary'.The transcoding process will use substitution characters if a given byte sequence cannot be adequately represented in the target encoding.
- source
A Buffer instance
- fromEnc
The current encoding
- toEnc
To target encoding
- returns
a new Buffer instance.
- object Buffer extends Object
- Annotations
- @native() @JSGlobal()
- object constants extends Object
- Annotations
- @native() @JSImport("buffer", "constants")