com.atlassian.confluence.importexport.resource
Class AttachmentDownloadResourceReader

java.lang.Object
  extended by com.atlassian.confluence.importexport.resource.AttachmentDownloadResourceReader
All Implemented Interfaces:
DownloadResourceReader

public class AttachmentDownloadResourceReader
extends java.lang.Object
implements DownloadResourceReader


Constructor Summary
AttachmentDownloadResourceReader(Attachment attachment, org.springframework.core.io.InputStreamSource inputStreamSource)
           
 
Method Summary
 long getContentLength()
           
 java.lang.String getContentType()
           
 java.util.Date getLastModificationDate()
           
 java.lang.String getName()
          User-displayable name of the resource.
 java.io.InputStream getStreamForReading()
          The input stream for reading the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentDownloadResourceReader

public AttachmentDownloadResourceReader(Attachment attachment,
                                        org.springframework.core.io.InputStreamSource inputStreamSource)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: DownloadResourceReader
User-displayable name of the resource. Used for resource name when downloading, for example.

Specified by:
getName in interface DownloadResourceReader
Returns:
a user-displayable name of the resource

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface DownloadResourceReader

getContentLength

public long getContentLength()
Specified by:
getContentLength in interface DownloadResourceReader

getLastModificationDate

public java.util.Date getLastModificationDate()
Specified by:
getLastModificationDate in interface DownloadResourceReader

getStreamForReading

public java.io.InputStream getStreamForReading()
Description copied from interface: DownloadResourceReader
The input stream for reading the resource. A new input stream is returned for each call to this method. The client is responsible for closing the returned stream in a finally block.

Specified by:
getStreamForReading in interface DownloadResourceReader
Returns:
InputStream for reading


Copyright © 2003-2014 Atlassian. All Rights Reserved.