Class FileDownloadResourceWriter
- java.lang.Object
-
- com.atlassian.confluence.importexport.resource.FileDownloadResourceWriter
-
- All Implemented Interfaces:
DownloadResourceWriter
public class FileDownloadResourceWriter extends Object implements DownloadResourceWriter
-
-
Constructor Summary
Constructors Constructor Description FileDownloadResourceWriter(String resourcePath, File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetResourcePath()The relative URL of the resource, including the application context path.OutputStreamgetStreamForWriting()Opens and returns a new output stream for writing the resource to a file.
-
-
-
Constructor Detail
-
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
-
-
Method Detail
-
getResourcePath
public String getResourcePath()
Description copied from interface:DownloadResourceWriterThe relative URL of the resource, including the application context path.- Specified by:
getResourcePathin interfaceDownloadResourceWriter- 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:
getStreamForWritingin interfaceDownloadResourceWriter- Returns:
OutputStreamfor writing
-
-