
public class JsFileReaderSync extends JsElementalMixinBase implements FileReaderSync
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
JsFileReaderSync() |
| Modifier and Type | Method and Description |
|---|---|
JsArrayBuffer |
readAsArrayBuffer(Blob blob)
|
String |
readAsBinaryString(Blob blob)
|
String |
readAsDataURL(Blob blob)
|
String |
readAsText(Blob blob)
This methods reads the specified blob's contents.
|
String |
readAsText(Blob blob,
String encoding)
This methods reads the specified blob's contents.
|
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPanat, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAtcast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toStringintAt, lengthnumberAtpublic final JsArrayBuffer readAsArrayBuffer(Blob blob)
FileReaderSyncThis method reads the contents of the specified Blob or File. When the read operation is finished, it returns an ArrayBuffer representing the file's data. If an error happened during the read, the adequate exception is sent.
blobBlob or File to read into the ArrayBuffer.An ArrayBuffer representing the file's data.
The following exceptions can be raised by this method:
NotFoundErrorBlob or File cannot be found, e. g. because it has been erased.SecurityErrorNotReadableErrorEncodingErrorreadAsArrayBuffer in interface FileReaderSyncpublic final String readAsBinaryString(Blob blob)
FileReaderSyncThis method reads the contents of the specified Blob, which may be a File. When the read operation is finished, it returns a DOMString containing the raw binary data from the file. If an error happened during the read, the adequate exception is sent.
readAsArrayBuffer() should be used instead.A DOMString containing the raw binary data from the resource
The following exceptions can be raised by this method:
NotFoundErrorBlob or File cannot be found, e. g. because it has been erased.SecurityErrorNotReadableErrorEncodingErrorreadAsBinaryString in interface FileReaderSyncpublic final String readAsDataURL(Blob blob)
FileReaderSyncThis method reads the contents of the specified Blob or File. When the read operation is finished, it returns a data URL representing the file's data. If an error happened during the read, the adequate exception is sent.
An DOMString representing the file's data as a data URL.
The following exceptions can be raised by this method:
NotFoundErrorBlob or File cannot be found, e. g. because it has been erased.SecurityErrorNotReadableErrorEncodingErrorreadAsDataURL in interface FileReaderSyncpublic final String readAsText(Blob blob)
FileReaderSyncThis methods reads the specified blob's contents. When the read operation is finished, it returns a DOMString containing the file represented as a text string. The optional encoding parameter indicates the encoding to be used. If not present, the method will apply a detection algorithm for it. If an error happened during the read, the adequate exception is sent.
A DOMString containing the raw binary data from the resource
The following exceptions can be raised by this method:
NotFoundErrorBlob or File cannot be found, e. g. because it has been erased.SecurityErrorNotReadableErrorreadAsText in interface FileReaderSyncpublic final String readAsText(Blob blob, String encoding)
FileReaderSyncThis methods reads the specified blob's contents. When the read operation is finished, it returns a DOMString containing the file represented as a text string. The optional encoding parameter indicates the encoding to be used. If not present, the method will apply a detection algorithm for it. If an error happened during the read, the adequate exception is sent.
A DOMString containing the raw binary data from the resource
The following exceptions can be raised by this method:
NotFoundErrorBlob or File cannot be found, e. g. because it has been erased.SecurityErrorNotReadableErrorreadAsText in interface FileReaderSyncCopyright © 2016. All rights reserved.