org.apache.james.repository.file
Class FilePersistentStreamRepository
java.lang.Object
org.apache.james.repository.file.AbstractFileRepository
org.apache.james.repository.file.FilePersistentStreamRepository
- All Implemented Interfaces:
- Configurable, LogEnabled, Repository, StreamRepository
public class FilePersistentStreamRepository
- extends AbstractFileRepository
- implements StreamRepository
Implementation of a StreamRepository to a File.
TODO: -retieve(String key) should return a FilterInputStream to allow
mark and reset methods. (working not like BufferedInputStream!!!)
| Methods inherited from class org.apache.james.repository.file.AbstractFileRepository |
configure, containsKey, createChildRepository, decode, encode, getChildRepository, getFile, getInputStream, getLogger, getOutputStream, init, list, remove, setDestination, setFileSystem, setLog |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilePersistentStreamRepository
public FilePersistentStreamRepository()
getExtensionDecorator
protected String getExtensionDecorator()
- Specified by:
getExtensionDecorator in class AbstractFileRepository
- See Also:
AbstractFileRepository.getExtensionDecorator()
get
public InputStream get(String key)
- Specified by:
get in interface StreamRepository
- See Also:
StreamRepository.get(java.lang.String)
put
public OutputStream put(String key)
- Specified by:
put in interface StreamRepository
- See Also:
StreamRepository.put(java.lang.String)
getSize
public long getSize(String key)
- Return the size of the file which belongs to the given key
- Parameters:
key - the key to get the size for
- Returns:
- size the Size which belongs to the givens keys file
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.