@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="FileReader")
public class FileReader
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
static int |
DONE |
static int |
EMPTY |
static int |
LOADING |
ProgressEventHandler |
onabort
The FileReader.onabort property contains an event handler executed when the abort event is fired, i.e.
|
ProgressEventHandler |
onerror
The FileReader onerror handler receives an Event object, not an Error object, as a parameter, but an error can be accessed from the FileReader object, as instanceOfFileReader.error
|
ProgressEventHandler |
onload
The FileReader.onload property contains an event handler executed when the load event is fired, when content read with readAsArrayBuffer, readAsBinaryString, readAsDataURL or readAsText is available.
|
ProgressEventHandler |
onloadend |
ProgressEventHandler |
onloadstart |
ProgressEventHandler |
onprogress |
| Constructor and Description |
|---|
FileReader()
The FileReader() constructor creates a new FileReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
The abort method aborts the read operation.
|
void |
addAbortListener(ProgressEventListener callback) |
void |
addAbortListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addAbortListener(ProgressEventListener callback,
boolean useCapture) |
void |
addErrorListener(ProgressEventListener callback) |
void |
addErrorListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addErrorListener(ProgressEventListener callback,
boolean useCapture) |
void |
addLoadendListener(ProgressEventListener callback) |
void |
addLoadendListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addLoadendListener(ProgressEventListener callback,
boolean useCapture) |
void |
addLoadListener(ProgressEventListener callback) |
void |
addLoadListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addLoadListener(ProgressEventListener callback,
boolean useCapture) |
void |
addLoadstartListener(ProgressEventListener callback) |
void |
addLoadstartListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addLoadstartListener(ProgressEventListener callback,
boolean useCapture) |
void |
addProgressListener(ProgressEventListener callback) |
void |
addProgressListener(ProgressEventListener callback,
AddEventListenerOptions options) |
void |
addProgressListener(ProgressEventListener callback,
boolean useCapture) |
DOMException |
error()
The FileReader error property returns the error that occurred while reading the file.
|
void |
readAsArrayBuffer(Blob blob)
The FileReader interface's readAsArrayBuffer() method is used to start reading the contents of a specified Blob or File.
|
void |
readAsBinaryString(Blob blob)
The readAsBinaryString method is used to start reading the contents of the specified Blob or File.
|
void |
readAsDataURL(Blob blob)
The readAsDataURL method is used to read the contents of the specified Blob or File.
|
void |
readAsText(Blob blob)
The readAsText() method is used to read the contents of the specified Blob or File.
|
void |
readAsText(Blob blob,
java.lang.String encoding)
The readAsText() method is used to read the contents of the specified Blob or File.
|
int |
readyState()
The FileReader readyState property provides the current state of the reading operation a FileReader is in.
|
void |
removeAbortListener(ProgressEventListener callback) |
void |
removeAbortListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeAbortListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeErrorListener(ProgressEventListener callback) |
void |
removeErrorListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeErrorListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeLoadendListener(ProgressEventListener callback) |
void |
removeLoadendListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeLoadendListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeLoadListener(ProgressEventListener callback) |
void |
removeLoadListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeLoadListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeLoadstartListener(ProgressEventListener callback) |
void |
removeLoadstartListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeLoadstartListener(ProgressEventListener callback,
EventListenerOptions options) |
void |
removeProgressListener(ProgressEventListener callback) |
void |
removeProgressListener(ProgressEventListener callback,
boolean useCapture) |
void |
removeProgressListener(ProgressEventListener callback,
EventListenerOptions options) |
StringOrArrayBufferUnion |
result()
The FileReader result property returns the file's contents.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListener@JsOverlay public static final int DONE
@JsOverlay public static final int EMPTY
@JsOverlay public static final int LOADING
@Nullable public ProgressEventHandler onabort
@Nullable public ProgressEventHandler onerror
@Nullable public ProgressEventHandler onload
@Nullable public ProgressEventHandler onloadend
@Nullable public ProgressEventHandler onloadstart
@Nullable public ProgressEventHandler onprogress
public FileReader()
@JsProperty(name="error") @Nullable public DOMException error()
@JsProperty(name="readyState") @FileReaderReadyState public int readyState()
@JsProperty(name="result") @Nullable public StringOrArrayBufferUnion result()
public void abort()
public void readAsArrayBuffer(@Nonnull
Blob blob)
public void readAsBinaryString(@Nonnull
Blob blob)
public void readAsDataURL(@Nonnull
Blob blob)
public void readAsText(@Nonnull
Blob blob,
@Nonnull
java.lang.String encoding)
public void readAsText(@Nonnull
Blob blob)
@JsOverlay
public final void addAbortListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addAbortListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addAbortListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeAbortListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeAbortListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeAbortListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addErrorListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addErrorListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addErrorListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeErrorListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeErrorListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeErrorListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addLoadListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLoadListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addLoadListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeLoadListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLoadListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLoadListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addLoadendListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLoadendListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addLoadendListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeLoadendListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLoadendListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLoadendListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addLoadstartListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLoadstartListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addLoadstartListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeLoadstartListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLoadstartListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLoadstartListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void addProgressListener(@Nonnull
ProgressEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addProgressListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void addProgressListener(@Nonnull
ProgressEventListener callback)
@JsOverlay
public final void removeProgressListener(@Nonnull
ProgressEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeProgressListener(@Nonnull
ProgressEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeProgressListener(@Nonnull
ProgressEventListener callback)