|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.bean.URLContentExportBean
public class URLContentExportBean
Export the Contents of a URL
Field Summary | |
---|---|
protected String |
charactersEncoding
Character encoding for export of file content. |
protected URLConnection |
connection
URLConnection to the URL resource to be exported |
protected boolean |
forceDownload
boolean for force download, see
#setDownloadForced(boolean) . |
Fields inherited from interface com.webmethods.caf.faces.bean.IFileExportBean |
---|
UNKNOWN_CONTENT_LENGTH |
Constructor Summary | |
---|---|
URLContentExportBean(URL url,
boolean forceDownload)
Constructor. |
Method Summary | |
---|---|
String |
getExportCharacterEncoding()
Returns character encoding for this export file content (valid only when isExportBinary() == false) |
int |
getExportContentLength()
Return the length of the content that is to be exported. |
String |
getExportContentType()
Gets the content type of the response being sent to the client. |
String |
getExportFileName()
Return the file name for the exported data |
boolean |
isDownloadForced()
Return true to send the response headers that will force the user to choose what to do with the file (Open vs. |
boolean |
isExportBinary()
Return true if the export will be sending binary data to the response, false if the export will be sending text. |
void |
setExportCharacterEncoding(String charactersEncoding)
Sets character encoding for this export file content (valid only when isExportBinary() == false) |
void |
writeExportBytes(OutputStream outStream)
Invoked to allow the bean to write binary data to the output stream. |
void |
writeExportText(PrintWriter arg0)
Invoked to allow the bean to write the export text to the output writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected URLConnection connection
URLConnection
to the URL resource to be exported
protected boolean forceDownload
boolean
for force download, see
#setDownloadForced(boolean)
.
protected String charactersEncoding
Default: UTF-8
Constructor Detail |
---|
public URLContentExportBean(URL url, boolean forceDownload) throws IOException
url
- URL to the resource to be exportedforceDownload
- force download, see URLContentExportBean.isDownloadForced()
IOException
- when exceptions in opening a connection to the passed URLMethod Detail |
---|
public int getExportContentLength()
IFileExportBean
getExportContentLength
in interface IFileExportBean
IFileExportBean.UNKNOWN_CONTENT_LENGTH
if it is not knownpublic String getExportContentType()
IFileExportBean
getExportContentType
in interface IFileExportBean
public String getExportFileName()
IFileExportBean
getExportFileName
in interface IFileExportBean
public boolean isDownloadForced()
IFileExportBean
isDownloadForced
in interface IFileExportBean
public boolean isExportBinary()
IFileExportBean
isExportBinary
in interface IFileExportBean
public void writeExportBytes(OutputStream outStream) throws IOException
IFileExportBean
writeExportBytes
in interface IFileExportBean
outStream
- the output stream
IOException
- thrown if there is an I/O exception during the exportpublic void writeExportText(PrintWriter arg0)
IFileExportBean
writeExportText
in interface IFileExportBean
arg0
- the output writerpublic String getExportCharacterEncoding()
IFileExportBeanEx
getExportCharacterEncoding
in interface IFileExportBeanEx
public void setExportCharacterEncoding(String charactersEncoding)
charactersEncoding
- Java character encoding name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |