Class Blob
Blob represents immutable binary data container.
For browsers providing support for Blob, Kaazing JavaScript client library uses browser's underlying Blob implementation.
For older browsers where Blob is not supported, Kaazing JavaScript client library provides custom implementation as an
Array-backed MemoryBlob.
Field Summary
|
Number
|
size
(Read only) Size (in bytes) of the Blob.
|
String
|
type
(Read only) MIME type of the Blob if it is known.
|
Constructor Summary |
Blob(parts, properties)
Creates a new Blob instance.
|
Method Summary
|
Blob
|
slice(start, end, contentType)
Slice the Blob and return a new Blob.
|
size
Number size
(Read only) Size (in bytes) of the Blob.
type
String type
(Read only) MIME type of the Blob if it is known. Empty string otherwise.
Blob
Blob(parts, properties)
Creates a new Blob instance.
Parameters:
Array parts
- (Optional) An array of data objects which can be any number of
ArrayBuffer, ArrayBufferView, Blob, or strings in any order.
BlobPropertyBag properties
- (Optional) A BlobPropertyBag object that provides the properties for the new Blob object.
slice
Blob slice(start, end, contentType)
Slice the Blob and return a new Blob.
Parameters:
Number start
- (Optional) An index indicating the first byte to copy from the source Blob to the new Blob.
Number end
- (Optional) An index indicating the last byte to copy from the source Blob to the new Blob.
String contentType
- (Optional) The content type to assign to the new Blob.