Home Manual Reference Source
public class | source

BlobBluffer

Method Summary

Public Methods
public

combine(blufferA: Blob, blufferB: Blob, blufferN: Array<Blob>): Promise<Blob>

Combines two Blobs to create a new Blob containing the two.

public

create(text: string): Promise<Blob>

Creates a Blob from a binary string.

public

createBase64(base64: string): Promise<Blob>

Creates a Blob from a base64 encoded string.

public

read(bluffer: Blob): Promise<string>

Extracts the contents of a Blob as a binary string.

public

readBase64(bluffer: Blob): Promise<string>

Extracts the contents of a Blob as a base64 string.

public

size(bluffer: Blob): number

Gets the length/size (in bytes) of the Bluffer.

public

slice(bluffer: Blob, start: number, end: number): Promise<Blob>

Creates a new Blob containing a slice of the original Blob.

Public Methods

public combine(blufferA: Blob, blufferB: Blob, blufferN: Array<Blob>): Promise<Blob> source

Combines two Blobs to create a new Blob containing the two.

Params:

NameTypeAttributeDescription
blufferA Blob
blufferB Blob
blufferN Array<Blob>

Return:

Promise<Blob>

public create(text: string): Promise<Blob> source

Creates a Blob from a binary string.

Params:

NameTypeAttributeDescription
text string

Return:

Promise<Blob>

public createBase64(base64: string): Promise<Blob> source

Creates a Blob from a base64 encoded string. Effectively decoding it.

Params:

NameTypeAttributeDescription
base64 string

Return:

Promise<Blob>

public read(bluffer: Blob): Promise<string> source

Extracts the contents of a Blob as a binary string.

Params:

NameTypeAttributeDescription
bluffer Blob

Return:

Promise<string>

public readBase64(bluffer: Blob): Promise<string> source

Extracts the contents of a Blob as a base64 string.

Params:

NameTypeAttributeDescription
bluffer Blob

Return:

Promise<string>

public size(bluffer: Blob): number source

Gets the length/size (in bytes) of the Bluffer.

Params:

NameTypeAttributeDescription
bluffer Blob

Return:

number

public slice(bluffer: Blob, start: number, end: number): Promise<Blob> source

Creates a new Blob containing a slice of the original Blob.

Params:

NameTypeAttributeDescription
bluffer Blob
start number
end number

Return:

Promise<Blob>