|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.filetransfer.AbstractDownloadProvider
nextapp.echo.filetransfer.ResourceDownloadProvider
public class ResourceDownloadProvider
A download provider that allows the download of a resource deployed with the application.
Field Summary | |
---|---|
protected java.lang.String |
contentType
|
Constructor Summary | |
---|---|
ResourceDownloadProvider(java.lang.String resourceName,
java.lang.String contentType)
Creates a new ResourceDownloadProvider to download the
specified resource. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
Returns the content type of the file. |
java.lang.String |
getFileName()
Returns the file name of the resource based on the resource name. |
boolean |
isFileNameProvided()
Returns true if the file name will be provided (based on the resource name). |
void |
setFileNameProvided(boolean fileNameProvided)
Sets whether the file name will be provided (based on the resouce name). |
void |
writeFile(java.io.OutputStream out)
Writes the file to the specified output stream. |
Methods inherited from class nextapp.echo.filetransfer.AbstractDownloadProvider |
---|
getSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String contentType
Constructor Detail |
---|
public ResourceDownloadProvider(java.lang.String resourceName, java.lang.String contentType)
ResourceDownloadProvider
to download the
specified resource.
resourceName
- The name of the resource to download.contentType
- the content type of the resource.Method Detail |
---|
public java.lang.String getContentType()
DownloadProvider
DownloadProvider.getContentType()
public java.lang.String getFileName()
FileNameProvided
flag has
been set to false.
getFileName
in interface DownloadProvider
getFileName
in class AbstractDownloadProvider
DownloadProvider.getFileName()
public boolean isFileNameProvided()
public void setFileNameProvided(boolean fileNameProvided)
fileNameProvided
- True if the file name should be provided.public void writeFile(java.io.OutputStream out) throws java.io.IOException
DownloadProvider
out
- The output stream to which the file should be written.
java.io.IOException
- If the provider is unable to perform this operation.DownloadProvider.writeFile(OutputStream)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |