| java.lang.Object org.zkoss.util.media.AMedia
AMedia | public class AMedia implements Media(Code) | | A media object holding content such PDF, HTML, DOC or XLS content.
author: tomyeh |
Constructor Summary | |
public | AMedia(String name, String format, String ctype, byte[] data) Construct with name, format, content type and binary data.
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. | public | AMedia(String name, String format, String ctype, String data) Construct with name, format, content type and text data. | public | AMedia(String name, String format, String ctype, InputStream data) Construct with name, format, content type and stream data (binary).
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. Parameters: ctype - the content type; might be null. Parameters: data - the binary data; never null.If the input stream is created dyanmically each time AMedia.getStreamDatais called, you shall pass AMedia.DYNAMIC_STREAMas the data argument. | public | AMedia(String name, String format, String ctype, Reader data) Construct with name, format, content type and reader data (textual).
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. Parameters: ctype - the content type; might be null. Parameters: data - the string data; never nullIf the reader is created dyanmically each tiime AMedia.getReaderDatais called, you shall pass AMedia.DYNAMIC_READERas the data argument. |
AMedia | public AMedia(String name, String format, String ctype, byte[] data)(Code) | | Construct with name, format, content type and binary data.
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. Example: "html" and "xml" Parameters: ctype - the content type; might be null. Example: "text/html"and "text/xml;charset=UTF-8". Parameters: data - the binary data; never null |
AMedia | public AMedia(String name, String format, String ctype, String data)(Code) | | Construct with name, format, content type and text data.
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. Parameters: ctype - the content type; might be null. Parameters: data - the text data; never null |
AMedia | public AMedia(String name, String format, String ctype, InputStream data)(Code) | | Construct with name, format, content type and stream data (binary).
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. Parameters: ctype - the content type; might be null. Parameters: data - the binary data; never null.If the input stream is created dyanmically each time AMedia.getStreamDatais called, you shall pass AMedia.DYNAMIC_STREAMas the data argument. Then, override AMedia.getStreamData to returnthe correct stream.Note: the caller of AMedia.getStreamData has to closethe returned input stream. |
AMedia | public AMedia(String name, String format, String ctype, Reader data)(Code) | | Construct with name, format, content type and reader data (textual).
It tries to construct format and ctype from each other or name.
Parameters: name - the name (usually filename); might be null. Parameters: format - the format; might be null. Parameters: ctype - the content type; might be null. Parameters: data - the string data; never nullIf the reader is created dyanmically each tiime AMedia.getReaderDatais called, you shall pass AMedia.DYNAMIC_READERas the data argument. Then, override AMedia.getReaderData to returnthe correct reader. |
getByteData | public byte[] getByteData()(Code) | | |
inMemory | public boolean inMemory()(Code) | | |
isBinary | public boolean isBinary()(Code) | | |
|
|