com.atlassian.confluence.importexport.resource
Class FileDownloadResourceWriter
java.lang.Object
com.atlassian.confluence.importexport.resource.FileDownloadResourceWriter
- All Implemented Interfaces:
- DownloadResourceWriter
public class FileDownloadResourceWriter
- extends Object
- implements DownloadResourceWriter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDownloadResourceWriter
public FileDownloadResourceWriter(String resourcePath,
File file)
- Parameters:
resourcePath
- the relative URL of resource including the application's context path. For example,
"/confluence/download/temp/chart1274.png".file
- the file the writer will open the output stream to
getResourcePath
public String getResourcePath()
- Description copied from interface:
DownloadResourceWriter
- The relative URL of the resource, including the application context path.
- Specified by:
getResourcePath
in interface DownloadResourceWriter
- Returns:
- the relative URL of the resource
getStreamForWriting
public OutputStream getStreamForWriting()
- Opens and returns a new output stream for writing the resource to a file.
Client is responsible for closing in a finally block.
- Specified by:
getStreamForWriting
in interface DownloadResourceWriter
- Returns:
OutputStream
for writing