@Override public void download(final File file) throws Throwable { rsp.download(file); }
@Override public void download(final String filename, final String location) throws Throwable { rsp.download(filename, location); }
/** * Transfer the file at path as an "attachment". Typically, browsers will prompt the user for * download. The <code>Content-Disposition</code> "filename=" parameter (i.e. the one that will * appear in the browser dialog) is set to filename by default. * * @param location Classpath location of the file. * @throws Exception If something goes wrong. */ default void download(final String location) throws Throwable { download(location, location); }
@Override public void download(final String filename, final InputStream stream) throws Throwable { rsp.download(filename, stream); }
@Override public void download(final String filename, final File file) throws Throwable { rsp.download(filename, file); }
@Override public void download(final String filename) throws Throwable { rsp.download(filename); }
/** * Transfer the file at path as an "attachment". Typically, browsers will prompt the user for * download. The <code>Content-Disposition</code> "filename=" parameter (i.e. the one that will * appear in the browser dialog) is set to filename by default. * * @param file A file to use. * @throws Exception If something goes wrong. */ default void download(final File file) throws Throwable { download(file.getName(), file); }
/** * Transfer the file at path as an "attachment". Typically, browsers will prompt the user for * download. The <code>Content-Disposition</code> "filename=" parameter (i.e. the one that will * appear in the browser dialog) is set to filename. * * @param filename A file name to use. * @param file A file to use. * @throws Exception If something goes wrong. */ default void download(final String filename, final File file) throws Throwable { length(file.length()); download(filename, new FileInputStream(file)); }
@Override public void download(final String filename, final File file) throws Throwable { rsp.download(filename, file); }
/** * Transfer the file at path as an "attachment". Typically, browsers will prompt the user for * download. The <code>Content-Disposition</code> "filename=" parameter (i.e. the one that will * appear in the browser dialog) is set to filename by default. * * @param location Classpath location of the file. * @throws Exception If something goes wrong. */ default void download(final String location) throws Throwable { download(location, location); }
@Override public void download(final String filename, final String location) throws Throwable { rsp.download(filename, location); }
@Override public void download(final File file) throws Throwable { rsp.download(file); }
@Override public void download(final String filename, final InputStream stream) throws Throwable { rsp.download(filename, stream); }
@Override public void download(final String filename) throws Throwable { rsp.download(filename); }
/** * Transfer the file at path as an "attachment". Typically, browsers will prompt the user for * download. The <code>Content-Disposition</code> "filename=" parameter (i.e. the one that will * appear in the browser dialog) is set to filename by default. * * @param file A file to use. * @throws Exception If something goes wrong. */ default void download(final File file) throws Throwable { download(file.getName(), file); }
/** * Transfer the file at path as an "attachment". Typically, browsers will prompt the user for * download. The <code>Content-Disposition</code> "filename=" parameter (i.e. the one that will * appear in the browser dialog) is set to filename. * * @param filename A file name to use. * @param file A file to use. * @throws Exception If something goes wrong. */ default void download(final String filename, final File file) throws Throwable { length(file.length()); download(filename, new FileInputStream(file)); }