Class AttachmentDownloadResourceReader
- java.lang.Object
-
- com.atlassian.confluence.importexport.resource.AttachmentDownloadResourceReader
-
- All Implemented Interfaces:
DownloadResourceReader
- Direct Known Subclasses:
PartialAttachmentDownloadResourceReader
public class AttachmentDownloadResourceReader extends Object implements DownloadResourceReader
-
-
Constructor Summary
Constructors Constructor Description AttachmentDownloadResourceReader(Attachment attachment, org.springframework.core.io.InputStreamSource inputStreamSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getContentLength()
String
getContentType()
Date
getLastModificationDate()
String
getName()
User-displayable name of the resource.InputStream
getStreamForReading()
The input stream for reading the resource.
-
-
-
Constructor Detail
-
AttachmentDownloadResourceReader
public AttachmentDownloadResourceReader(Attachment attachment, org.springframework.core.io.InputStreamSource inputStreamSource)
-
-
Method Detail
-
getName
public 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 interfaceDownloadResourceReader
- Returns:
- a user-displayable name of the resource
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceDownloadResourceReader
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceDownloadResourceReader
-
getLastModificationDate
public Date getLastModificationDate()
- Specified by:
getLastModificationDate
in interfaceDownloadResourceReader
-
getStreamForReading
public 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 interfaceDownloadResourceReader
- Returns:
InputStream
for reading
-
-