Apache JAMES Mime4j 0.6-redhat-2

org.apache.james.mime4j.storage
Interface StorageProvider

All Known Implementing Classes:
AbstractStorageProvider, CipherStorageProvider, MemoryStorageProvider, TempFileStorageProvider, ThresholdStorageProvider

public interface StorageProvider

Provides a strategy for storing the contents of an InputStream or retrieving the content written to an OutputStream.


Method Summary
 StorageOutputStream createStorageOutputStream()
          Creates a StorageOutputStream where data to be stored can be written to.
 Storage store(InputStream in)
          Stores the contents of the given InputStream.
 

Method Detail

store

Storage store(InputStream in)
              throws IOException
Stores the contents of the given InputStream.

Parameters:
in - stream containing the data to store.
Returns:
a Storage instance that can be used to retrieve the stored content.
Throws:
IOException - if an I/O error occurs.

createStorageOutputStream

StorageOutputStream createStorageOutputStream()
                                              throws IOException
Creates a StorageOutputStream where data to be stored can be written to. Subsequently the user can call toStorage() on that object to get a Storage instance that holds the data that has been written.

Returns:
a StorageOutputStream where data can be written to.
Throws:
IOException - if an I/O error occurs.

Apache JAMES Mime4j 0.6-redhat-2

Copyright © 2004-2012 JBoss by Red Hat. All Rights Reserved.