com.atlassian.confluence.core
Class UploadedResource

java.lang.Object
  extended by org.springframework.core.io.AbstractResource
      extended by com.atlassian.confluence.core.UploadedResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class UploadedResource
extends org.springframework.core.io.AbstractResource

Resource wrapper for uploaded files. This will become extra handy once we get a better multipart file handling e.g. Attachments handled entirely in memory


Constructor Summary
UploadedResource(FileUploadUtils.UploadedFile uploadedFile)
           
 
Method Summary
 long getContentLength()
           
 String getContentType()
           
 String getDescription()
           
 File getFile()
           
 String getFilename()
           
 InputStream getInputStream()
           
 
Methods inherited from class org.springframework.core.io.AbstractResource
createRelative, equals, exists, getURL, hashCode, isOpen, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UploadedResource

public UploadedResource(FileUploadUtils.UploadedFile uploadedFile)
Method Detail

getDescription

public String getDescription()
Specified by:
getDescription in interface org.springframework.core.io.Resource
Specified by:
getDescription in class org.springframework.core.io.AbstractResource

getFile

public File getFile()
             throws IOException
Specified by:
getFile in interface org.springframework.core.io.Resource
Overrides:
getFile in class org.springframework.core.io.AbstractResource
Throws:
IOException

getFilename

public String getFilename()
                   throws IllegalStateException
Specified by:
getFilename in interface org.springframework.core.io.Resource
Overrides:
getFilename in class org.springframework.core.io.AbstractResource
Throws:
IllegalStateException

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getContentType

public String getContentType()

getContentLength

public long getContentLength()


Confluence is developed by Atlassian Pty Ltd.