diff --git a/Overview.html b/Overview.html index 1cbaf7a..21ddf95 100644 --- a/Overview.html +++ b/Overview.html @@ -23,7 +23,7 @@ -
W3C

File API

Editor's Draft 19 November 2014

This Version:
http://dev.w3.org/2006/webapi/FileAPI/
Latest Published Version:
http://www.w3.org/TR/FileAPI/
Latest Editor’s Draft:
http://dev.w3.org/2006/webapi/FileAPI/
Previous Version(s):
http://www.w3.org/TR/2012/WD-FileAPI-20121025/
Editors:
Arun Ranganathan, Mozilla Corporation <arun@mozilla.com>
Jonas Sicking, Mozilla Corporation <jonas@sicking.cc>
Participate:

Send feedback to public-webapps@w3.org (archives), or file a bug +

W3C

File API

Editor's Draft 24 November 2014

This Version:
http://dev.w3.org/2006/webapi/FileAPI/
Latest Published Version:
http://www.w3.org/TR/FileAPI/
Latest Editor’s Draft:
http://dev.w3.org/2006/webapi/FileAPI/
Previous Version(s):
http://www.w3.org/TR/2012/WD-FileAPI-20121025/
Editors:
Arun Ranganathan, Mozilla Corporation <arun@mozilla.com>
Jonas Sicking, Mozilla Corporation <jonas@sicking.cc>
Participate:

Send feedback to public-webapps@w3.org (archives), or file a bug (see existing bugs).


@@ -73,7 +73,7 @@

Status of this Document

report can be found in the W3C technical reports index at http://www.w3.org/TR/.

- This document is the 19 November 2014 Editor's Draft of the + This document is the 24 November 2014 Editor's Draft of the File API specification. Please send comments about this document to @@ -870,28 +870,28 @@

8.1 The Read Operation

To perform a read operation on a Blob and the synchronous flag, run the following steps:

    -
  1. Let s be a a new body, b be the Blob to be read from, and bytes initially set to an empty byte sequence. While there are still bytes to be read in b perform the following substeps:

    +
  2. Let s be a a new body, b be the Blob to be read from, and bytes initially set to an empty byte sequence. Set the length on s to the size of b. While there are still bytes to be read in b perform the following substeps:

    Note

    The algorithm assumes that invoking methods have checked for readability state. A Blob in the CLOSED state must not have a read operation called on it.

    1. If the synchronous flag is set, follow the steps below:

      -
      1. Let bytes be the byte sequence that results from reading a chunk from b. If an error occurs reading a chunk from b, return failure along with a failure reason, and terminate this algorithm.

        +
        1. Let bytes be the byte sequence that results from reading a chunk from b. If an error occurs reading a chunk from b, return s with the error flag set, along with a failure reason, and terminate this algorithm.

          Note

          Along with returning failure, the synchronous part of this algorithm must return the failure reason that occurred for throwing an exception by synchronous methods that invoke this algorithm with the synchronous flag set.

        2. -
        3. If there are no errors, push bytes to s, and increment s's length [Fetch] by the number of bytes in bytes. Reset bytes to the empty byte sequence and continue reading chunks as above.

        4. +
        5. If there are no errors, push bytes to s, and increment s's transmitted [Fetch] by the number of bytes in bytes. Reset bytes to the empty byte sequence and continue reading chunks as above.

        6. When all the bytes of b have been read into s, return s and terminate this algorithm.

      2. Otherwise, the synchronous flag is unset. Return s and process the rest of this algorithm asynchronously.

      3. -
      4. Let bytes be the byte sequence that results from reading a chunk from b. If an error occurs reading a chunk from b, terminate this algorithm with a failure reason.

        +
      5. Let bytes be the byte sequence that results from reading a chunk from b. If an error occurs reading a chunk from b, set the error flag on s, and terminate this algorithm with a failure reason.

        Note

        The asynchronous part of this algorithm must signal the failure reason that occurred for asynchronous error reporting by methods expecting s and which invoke this algorithm with the synchronous flag unset.

      6. -
      7. If no error occurs, push bytes to s, and increment s's length [Fetch] by the number of bytes in bytes. Reset bytes to the empty byte sequence and continue reading chunks as above.

      8. +
      9. If no error occurs, push bytes to s, and increment s's transmitted [Fetch] by the number of bytes in bytes. Reset bytes to the empty byte sequence and continue reading chunks as above.