| org.zkoss.zhtml.Object org.zkoss.zhtml.Filedownload
Filedownload | public class Filedownload (Code) | | File download utilities.
author: tomyeh |
Method Summary | |
public static void | save(Media media) Open a download dialog to save the specified content at the client. | public static void | save(Media media, String flnm) Open a download dialog to save the specified content at the client
with the suggested file name. | public static void | save(byte[] content, String contentType, String flnm) Open a download dialog to save the specified content at the client
with the suggested file name. | public static void | save(String content, String contentType, String flnm) Open a download dialog to save the specified content at the client
with the suggested file name. | public static void | save(InputStream content, String contentType, String flnm) Open a download dialog to save the specified content at the client
with the suggested file name. | public static void | save(Reader content, String contentType, String flnm) Open a download dialog to save the specified content at the client
with the suggested file name. |
save | public static void save(Media media)(Code) | | Open a download dialog to save the specified content at the client.
|
save | public static void save(Media media, String flnm)(Code) | | Open a download dialog to save the specified content at the client
with the suggested file name.
Parameters: media - the media to download Parameters: flnm - the suggested file name, e.g., myfile.pdf.If null, Media.getName is assumed. |
save | public static void save(byte[] content, String contentType, String flnm)(Code) | | Open a download dialog to save the specified content at the client
with the suggested file name.
Parameters: content - the content Parameters: contentType - the content type (aka., mine type),e.g., application/pdf Parameters: flnm - the suggested file name, e.g., myfile.pdf.If null, no suggested name is provided. |
save | public static void save(String content, String contentType, String flnm)(Code) | | Open a download dialog to save the specified content at the client
with the suggested file name.
Parameters: content - the content Parameters: contentType - the content type (aka., mine type),e.g., application/pdf Parameters: flnm - the suggested file name, e.g., myfile.pdf.If null, no suggested name is provided. |
save | public static void save(InputStream content, String contentType, String flnm)(Code) | | Open a download dialog to save the specified content at the client
with the suggested file name.
Parameters: content - the content Parameters: contentType - the content type (aka., mine type),e.g., application/pdf Parameters: flnm - the suggested file name, e.g., myfile.pdf.If null, no suggested name is provided. |
save | public static void save(Reader content, String contentType, String flnm)(Code) | | Open a download dialog to save the specified content at the client
with the suggested file name.
Parameters: content - the content Parameters: contentType - the content type (aka., mine type),e.g., application/pdf Parameters: flnm - the suggested file name, e.g., myfile.pdf.If null, no suggested name is provided. |
|
|