readAsArrayBuffer()
方法在
FileReaderSync
interface allows to read
File
or
Blob
objects in a synchronous way into an
ArrayBuffer
. This interface is
only available
in
workers
as it enables synchronous I/O that could potentially block.
ArrayBuffer readAsArrayBuffer( in Blob blob );
blob
File
or
Blob
to read into the
File
or
ArrayBuffer
.
ArrayBuffer
representing the file's data.
The following exceptions can be raised by this method:
NotFoundError
File
or
Blob
cannot be found, e.g. because it has been erased.
SecurityError
NotReadableError
is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
EncodingError
is raised when the resource is a data URL and exceed the limit length defined by each browser.
| 规范 | 状态 | 注释 |
|---|---|---|
|
文件 API
The definition of 'readAsArrayBufferSync' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
readAsArrayBuffer
|
Chrome Yes | Edge 12 | Firefox 8 | IE Yes | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android 8 | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
FileReaderSync