Package com.logicaldoc.email
Class EmailCache
- java.lang.Object
 - 
- java.util.AbstractCollection<E>
 - 
- java.util.AbstractSet<E>
 - 
- java.util.HashSet<String>
 - 
- com.logicaldoc.email.EmailCache
 
 
 
 
 
- 
- All Implemented Interfaces:
 Serializable,Cloneable,Iterable<String>,Collection<String>,Set<String>
public class EmailCache extends HashSet<String>
Implements a cache of imported email, basically a email cache is represented as an mailID.- Since:
 - 4.0
 - Author:
 - Matteo Caruso - LogicalDOC
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description EmailCache(File file) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend()Appends the last entry to the fileFilegetFile()voidput(String mailID)voidread()Reads all data from filevoidwrite()Writes all entries into the file- 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator 
- 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll 
- 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString 
- 
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
EmailCache
public EmailCache(File file) throws IOException
- Throws:
 IOException
 
 - 
 
- 
Method Detail
- 
getFile
public File getFile()
 
- 
read
public void read() throws IOExceptionReads all data from file- Throws:
 IOException- unable to read the cache file
 
- 
write
public void write() throws IOExceptionWrites all entries into the file- Throws:
 IOException- unable to write the cache file
 
- 
append
public void append() throws IOExceptionAppends the last entry to the file- Throws:
 IOException- error writing the CSV file
 
- 
put
public void put(String mailID)
 
 - 
 
 -