class ParseFile implements Parcelable {

  public Task<InputStream> getDataStreamInBackground(final ProgressCallback progressCallback) {
    final TaskCompletionSource<Void> cts = new TaskCompletionSource<>();
    currentTasks.add(cts);

    return taskQueue.enqueue(new Continuation<Void, Task<InputStream>>() {
      @Override
      public Task<InputStream> then(Task<Void> toAwait) throws Exception {
        return fetchInBackground(progressCallback, toAwait, cts.getTask()).onSuccess(new Continuation<File, InputStream>() {
          @Override
          public InputStream then(Task<File> task) throws Exception {
            return new FileInputStream(task.getResult());
          }
        });
      }
    }).continueWithTask(new Continuation<InputStream, Task<InputStream>>() {
      @Override
      public Task<InputStream> then(Task<InputStream> task) throws Exception {
        cts.trySetResult(null); // release
        currentTasks.remove(cts);
        return task;
      }
    });
  }

  public  ParseFile(File file);
  public  ParseFile(File file, String contentType);
  public  ParseFile(String name, byte[] data, String contentType);
  public  ParseFile(byte[] data);
  public  ParseFile(String name, byte[] data);
  public  ParseFile(byte[] data, String contentType);
  protected  ParseFile(Parcel source);
    ParseFile(Parcel source, ParseParcelDecoder decoder);
    ParseFile(State state);
  @SuppressWarnings("unused")  ParseFile(JSONObject json, ParseDecoder decoder);

}