Package water.api.DownloadDataHandler

Examples of water.api.DownloadDataHandler.DownloadData


  // Output
  @API(help="CSV Stream") InputStream csv;
  @API(help="Suggested Filename")String filename;

  @Override public DownloadData createImpl() {
    DownloadData dd = new DownloadData();
    dd.src_key = key;
    return dd;
  }
View Full Code Here


    filename = dd.filename;
    return this;
  }

  @Override public DownloadData fillFromSchema() {
    DownloadData dd = new DownloadData();
    dd.filename = filename;
    dd.csv = csv;
    return dd;
  }
View Full Code Here

      throw H2O.fail();
    }
  }

  private Response wrap2(String http_code, Schema s) {
    DownloadData dd = (DownloadData) s.fillFromSchema();
    Response res = new Response(http_code, MIME_DEFAULT_BINARY, dd.csv);
    res.addHeader("Content-Disposition", "filename=" + dd.filename);
    return res;
  }
View Full Code Here

TOP

Related Classes of water.api.DownloadDataHandler.DownloadData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.