org.apache.james.mime4j.storage
Class AbstractStorageProvider
java.lang.Object
org.apache.james.mime4j.storage.AbstractStorageProvider
- All Implemented Interfaces:
- StorageProvider
- Direct Known Subclasses:
- CipherStorageProvider, MemoryStorageProvider, TempFileStorageProvider, ThresholdStorageProvider
public abstract class AbstractStorageProvider
- extends Object
- implements StorageProvider
Abstract implementation of StorageProvider that implements
store(InputStream) by copying the
input stream to a StorageOutputStream obtained from
createStorageOutputStream().
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStorageProvider
protected AbstractStorageProvider()
- Sole constructor.
store
public final Storage store(InputStream in)
throws IOException
- This implementation creates a
StorageOutputStream by calling
createStorageOutputStream()
and copies the content of the given input stream to that output stream.
It then calls StorageOutputStream.toStorage() on the output
stream and returns this object.
- Specified by:
store in interface StorageProvider
- 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.
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.