Class AbstractFilePersistenceStrategy
java.lang.Object
com.thoughtworks.xstream.persistence.AbstractFilePersistenceStrategy
- All Implemented Interfaces:
PersistenceStrategy
- Direct Known Subclasses:
FilePersistenceStrategy,FileStreamStrategy
Abstract base class for file based persistence strategies.
- Since:
- 1.3.1
- Author:
- Guilherme Silveira, Joerg Schaible
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected class -
Constructor Summary
ConstructorsConstructorDescriptionAbstractFilePersistenceStrategy(File baseDirectory, XStream xstream, String encoding) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) protected abstract ObjectextractKey(String name) Given a filename, the unescape method returns the key which originated it.protected ConverterLookupprotected Mapperprotected abstract StringGiven a key, the escape method returns the filename which shall be used.protected booleaniterator()intsize()
-
Constructor Details
-
AbstractFilePersistenceStrategy
-
-
Method Details
-
getConverterLookup
-
getMapper
-
isValid
-
extractKey
Given a filename, the unescape method returns the key which originated it.- Parameters:
name- the filename- Returns:
- the original key
-
getName
Given a key, the escape method returns the filename which shall be used.- Parameters:
key- the key- Returns:
- the desired and escaped filename
-
put
- Specified by:
putin interfacePersistenceStrategy
-
iterator
- Specified by:
iteratorin interfacePersistenceStrategy
-
size
public int size()- Specified by:
sizein interfacePersistenceStrategy
-
containsKey
-
get
- Specified by:
getin interfacePersistenceStrategy
-
remove
- Specified by:
removein interfacePersistenceStrategy
-