public class Filedownload extends Object
| Constructor and Description |
|---|
Filedownload() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
static void |
save(org.zkoss.util.media.Media media)
Open a download dialog to save the specified content at the client.
|
static void |
save(org.zkoss.util.media.Media media,
String flnm)
Open a download dialog to save the specified content at the client with the suggested file
name.
|
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.
|
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(org.zkoss.util.media.Media media)
public static void save(org.zkoss.util.media.Media media,
String flnm)
media - the media to downloadflnm - the suggested file name, e.g., myfile.pdf. If null, Media.getName() is
assumed.public static void save(byte[] content,
String contentType,
String flnm)
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.public static void save(String content, String contentType, String flnm)
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.public static void save(InputStream content, String contentType, String flnm)
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.public static void save(Reader content, String contentType, String flnm)
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.Copyright © 2021. All rights reserved.