com.octo.android.robospice.persistence.keysanitation
Class DefaultKeySanitizer
java.lang.Object
com.octo.android.robospice.persistence.keysanitation.DefaultKeySanitizer
- All Implemented Interfaces:
- KeySanitizer
public class DefaultKeySanitizer
- extends Object
- implements KeySanitizer
Uses base 64 to sanitize/de-sanitize keys. Only applies to cache keys that
are strings. Keys sanitized by this class can be safely used to create file
names (and urls).
- Author:
- SNI
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultKeySanitizer
public DefaultKeySanitizer()
sanitizeKey
public Object sanitizeKey(Object cacheKey)
throws KeySanitationExcepion
- Description copied from interface:
KeySanitizer
- Will sanitize a given cache key.
- Specified by:
sanitizeKey
in interface KeySanitizer
- Parameters:
cacheKey
- the cache key to sanitize.
- Returns:
- the sanitized cache key.
- Throws:
KeySanitationExcepion
desanitizeKey
public Object desanitizeKey(Object sanitzedCacheKey)
throws KeySanitationExcepion
- Description copied from interface:
KeySanitizer
- Will de-sanitize a given sanitized cache key.
- Specified by:
desanitizeKey
in interface KeySanitizer
- Parameters:
sanitzedCacheKey
- the cache key to de-sanitize.
- Returns:
- the de-sanitized cache key.
- Throws:
KeySanitationExcepion
Copyright © 2012-2014. All Rights Reserved.