Package org.zkoss.zhtml
Class Filedownload
java.lang.Object
org.zkoss.zhtml.Filedownload
File download utilities.
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidOpen a download dialog to save the specified content at the client with the suggested file name.static voidsave(InputStream content, String contentType, String flnm) Open a download dialog to save the specified content at the client with the suggested file name.static voidOpen a download dialog to save the specified content at the client with the suggested file name.static voidOpen a download dialog to save the specified content at the client with the suggested file name.static voidsave(org.zkoss.util.media.Media media) Open a download dialog to save the specified content at the client.static voidOpen a download dialog to save the specified content at the client with the suggested file name.
-
Constructor Details
-
Filedownload
public Filedownload()
-
-
Method Details
-
save
public static void save(org.zkoss.util.media.Media media) Open a download dialog to save the specified content at the client. -
save
Open a download dialog to save the specified content at the client with the suggested file name.- Parameters:
media- the media to downloadflnm- the suggested file name, e.g., myfile.pdf. If null,Media.getName()is assumed.
-
save
Open a download dialog to save the specified content at the client with the suggested file name.- Parameters:
content- the contentcontentType- the content type (a.k.a., MIME type), e.g., application/pdfflnm- the suggested file name, e.g., myfile.pdf. If null, no suggested name is provided.
-
save
Open a download dialog to save the specified content at the client with the suggested file name.- Parameters:
content- the contentcontentType- the content type (a.k.a., MIME type), e.g., application/pdfflnm- the suggested file name, e.g., myfile.pdf. If null, no suggested name is provided.
-
save
Open a download dialog to save the specified content at the client with the suggested file name.- Parameters:
content- the contentcontentType- the content type (a.k.a., MIME type), e.g., application/pdfflnm- the suggested file name, e.g., myfile.pdf. If null, no suggested name is provided.
-
save
Open a download dialog to save the specified content at the client with the suggested file name.- Parameters:
content- the contentcontentType- the content type (a.k.a., MIME type), e.g., application/pdfflnm- the suggested file name, e.g., myfile.pdf. If null, no suggested name is provided.
-