FileReaderSync Class

Reads the content of a blob synchronously (https://w3c.github.io/FileAPI/#FileReaderSync), in the dedicated and shared workers.

public sealed class FileReaderSync

Constructors

NameDescription
FileReaderSync()https://w3c.github.io/FileAPI/#filereadersyncConstrctr

FileReaderSync()

FileReaderSync.cs

https://w3c.github.io/FileAPI/#filereadersyncConstrctr

public FileReaderSync()

Methods

NameDescription
ReadAsArrayBuffer(Blob)Returns a copy of the content of the blob (an ArrayBuffer in JavaScript, https://w3c.github.io/FileAPI/#readAsArrayBufferSyncSection).
ReadAsBinaryString(Blob)Returns the content of the blob as a binary string: each byte is a code unit (https://w3c.github.io/FileAPI/#readAsBinaryStringSyncSection).
ReadAsDataUrl(Blob)Returns the content of the blob as a data: URL whose body is base64-encoded (https://w3c.github.io/FileAPI/#readAsDataURLSync-section).
ReadAsText(Blob, string?)Returns the content of the blob as text (https://w3c.github.io/FileAPI/#readAsTextSync), decoded with the byte order mark, else the encoding label, else the charset of the type of the blob, else UTF-8.

ReadAsArrayBuffer(Blob)

FileReaderSync.cs

Returns a copy of the content of the blob (an ArrayBuffer in JavaScript, https://w3c.github.io/FileAPI/#readAsArrayBufferSyncSection).

public byte[] ReadAsArrayBuffer(Blob blob)

ReadAsBinaryString(Blob)

FileReaderSync.cs

Returns the content of the blob as a binary string: each byte is a code unit (https://w3c.github.io/FileAPI/#readAsBinaryStringSyncSection).

public string ReadAsBinaryString(Blob blob)

ReadAsDataUrl(Blob)

FileReaderSync.cs

Returns the content of the blob as a data: URL whose body is base64-encoded (https://w3c.github.io/FileAPI/#readAsDataURLSync-section).

public string ReadAsDataUrl(Blob blob)

ReadAsText(Blob, string?)

FileReaderSync.cs

Returns the content of the blob as text (https://w3c.github.io/FileAPI/#readAsTextSync), decoded with the byte order mark, else the encoding label, else the charset of the type of the blob, else UTF-8.

public string ReadAsText(Blob blob, string? encoding = null)