Packages

class FileReader extends Object

The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read.

File objects may be obtained from a FileList object returned as a result of a user selecting files using the element, from a drag and drop operation's DataTransfer object, or from the mozGetAsFile() API on an HTMLCanvasElement.

Annotations
@RawJSType() @native()
See also

https://developer.mozilla.org/en-US/docs/Web/API/FileReader

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileReader
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileReader()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def abort(): Unit

    Aborts the read operation.

    Aborts the read operation. Upon return, the readyState will be DONE.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def error: DOMError

    A DOMError representing the error that occurred while reading the file.

  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  12. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  19. var onabort: Function

    A handler for the abort event.

    A handler for the abort event. This event is triggered each time the reading operation is aborted.

  20. var onerror: Function

    A handler for the error event.

    A handler for the error event. This event is triggered each time the reading operation encounter an error.

  21. var onload: Function

    A handler for the load event.

    A handler for the load event. This event is triggered each time the reading operation is successfully completed.

  22. var onloadend: Function

    A handler for the loadend event.

    A handler for the loadend event. This event is triggered each time the reading operation is completed (either in success or failure).

  23. var onloadstart: Function

    A handler for the loadstart event.

    A handler for the loadstart event. This event is triggered each time the reading is starting.

  24. var onprogress: Function

    A handler for the progress event.

    A handler for the progress event. This event is triggered while reading a Blob content.

  25. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  26. def readAsArrayBuffer(blob: |[Blob, File]): Unit

    The FileReader interface's readAsArrayBuffer() method is used to start reading the contents of a specified Blob or File.

    The FileReader interface's readAsArrayBuffer() method is used to start reading the contents of a specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains an ArrayBuffer representing the file's data.

    blob

    the Blob or File from which to read.

  27. def readAsBinaryString(blob: |[Blob, File]): Unit

    The readAsBinaryString method is used to start reading the contents of the specified Blob or File.

    The readAsBinaryString method is used to start reading the contents of the specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains the raw binary data from the file.

    blob

    the Blob or File from which to read.

  28. def readAsDataURL(blob: |[Blob, File]): Unit

    The readAsDataURL method is used to read the contents of the specified Blob or File.

    The readAsDataURL method is used to read the contents of the specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains the data as a URL representing the file's data as a base64 encoded string.

    blob

    the Blob or File from which to read.

  29. def readAsText(blob: |[Blob, File], encoding: String = js.native): Unit

    The readAsText method is used to read the contents of the specified Blob or File.

    The readAsText method is used to read the contents of the specified Blob or File. When the read operation is complete, the readyState is changed to DONE, the loadend is triggered, and the result attribute contains the contents of the file as a text string.

    blob

    the Blob or File from which to read.

    encoding

    A string specifying the encoding to use for the returned data. By default, UTF-8 is assumed if this parameter is not specified.

  30. def readyState: Int

    A number indicating the state of the FileReader.

    A number indicating the state of the FileReader.

    See also

    FileReader.DONE

    FileReader.LOADING

    FileReader.EMPTY

  31. def result: Any

    The file's contents.

    The file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.

  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toLocaleString(): String
    Definition Classes
    Object
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. def valueOf(): Any
    Definition Classes
    Object
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped