BufferBluffer
Method Summary
Public Methods | ||
public |
Combines two Buffers to create a new Buffer containing the two. |
|
public |
Creates a Buffer from a binary string. |
|
public |
createBase64(base64: string): Promise<Buffer> Creates a Buffer from a base64 encoded string. |
|
public |
Extracts the contents of a Buffer as a binary string. |
|
public |
readBase64(bluffer: Buffer): Promise<string> Extracts the contents of a Buffer as a base64 string. |
|
public |
Gets the length/size (in bytes) of the Buffer. |
|
public |
Creates a new Buffer containing a slice of the original Buffer. |
Public Methods
public combine(blufferA: Buffer, blufferB: Buffer, blufferN: Array<Buffer>): Promise<Buffer> source
Combines two Buffers to create a new Buffer containing the two.
Params:
Name | Type | Attribute | Description |
blufferA | Buffer | ||
blufferB | Buffer | ||
blufferN | Array<Buffer> |
public create(text: string): Promise<Buffer> source
Creates a Buffer from a binary string.
Params:
Name | Type | Attribute | Description |
text | string |
public createBase64(base64: string): Promise<Buffer> source
Creates a Buffer from a base64 encoded string. Effectively decoding it.
Params:
Name | Type | Attribute | Description |
base64 | string |
public read(bluffer: Buffer): Promise<string> source
Extracts the contents of a Buffer as a binary string.
Params:
Name | Type | Attribute | Description |
bluffer | Buffer |
public readBase64(bluffer: Buffer): Promise<string> source
Extracts the contents of a Buffer as a base64 string.
Params:
Name | Type | Attribute | Description |
bluffer | Buffer |