An immutable object representing an array of bytes.

Index

Constructors

Private constructor

Methods

isEqual

  • isEqual(otherBlob):boolean
  • Returns true if thisBlob is equal to the provided one.

    Parameters

    • other:Blob

      TheBlob to compare against.

    Returnsboolean

    true if thisBlob is equal to the provided one.

toBase64

  • toBase64():string
  • Returns the bytes of a Blob as a Base64-encoded string.

    Returnsstring

    The Base64-encoded string created from the Blob object.

toUint8Array

  • toUint8Array():Uint8Array
  • Returns the bytes of a Blob in a new Uint8Array.

    ReturnsUint8Array

    The Uint8Array created from the Blob object.

Static fromBase64String

  • fromBase64String(base64string):Blob
  • Creates a new Blob from the given Base64 string, converting it tobytes.

    Parameters

    • base64:string

      The Base64 string used to create the Blob object.

    ReturnsBlob

Static fromUint8Array

  • fromUint8Array(arrayUint8Array):Blob
  • Creates a new Blob from the given Uint8Array.

    Parameters

    • array:Uint8Array

      The Uint8Array used to create the Blob object.

    ReturnsBlob

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.