com.xebialabs.deployit.core.rest.resteasy
Class Mime4jStorageProvider.Mime4jTempFile

java.lang.Object
  extended by com.xebialabs.deployit.core.rest.resteasy.Mime4jStorageProvider.Mime4jTempFile
All Implemented Interfaces:
com.xebialabs.deployit.io.TemporaryFiles.TemporaryFile, org.apache.james.mime4j.storage.Storage
Enclosing class:
Mime4jStorageProvider

public static final class Mime4jStorageProvider.Mime4jTempFile
extends java.lang.Object
implements org.apache.james.mime4j.storage.Storage, com.xebialabs.deployit.io.TemporaryFiles.TemporaryFile

Adaption of the standard TempFileStorage found in Mime4j's TemporaryFileStorageProvider. It keeps a reference to all the streams that have been opened on the file, so that they can be closed before deleting the file.


Constructor Summary
Mime4jStorageProvider.Mime4jTempFile(java.io.File file)
           
 
Method Summary
 void delete()
           
 boolean deleteWithResponse()
           
 java.io.InputStream getInputStream()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mime4jStorageProvider.Mime4jTempFile

public Mime4jStorageProvider.Mime4jTempFile(java.io.File file)
Method Detail

delete

public void delete()
Specified by:
delete in interface com.xebialabs.deployit.io.TemporaryFiles.TemporaryFile
Specified by:
delete in interface org.apache.james.mime4j.storage.Storage

deleteWithResponse

public boolean deleteWithResponse()
Specified by:
deleteWithResponse in interface com.xebialabs.deployit.io.TemporaryFiles.TemporaryFile

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface org.apache.james.mime4j.storage.Storage
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object