com.atlassian.confluence.importexport.resource
Class FileDownloadResourceWriter

java.lang.Object
  extended by com.atlassian.confluence.importexport.resource.FileDownloadResourceWriter
All Implemented Interfaces:
DownloadResourceWriter

public class FileDownloadResourceWriter
extends java.lang.Object
implements DownloadResourceWriter


Constructor Summary
FileDownloadResourceWriter(java.lang.String resourcePath, java.io.File file)
           
 
Method Summary
 java.lang.String getResourcePath()
          The relative URL of the resource, including the application context path.
 java.io.OutputStream getStreamForWriting()
          Opens and returns a new output stream for writing the resource to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDownloadResourceWriter

public FileDownloadResourceWriter(java.lang.String resourcePath,
                                  java.io.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 java.lang.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 java.io.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


Copyright © 2003-2014 Atlassian. All Rights Reserved.