models
Class CacheFile

java.lang.Object
  extended by models.CacheFile
Direct Known Subclasses:
CacheEisObject, CacheFileInfo

public abstract class CacheFile
extends java.lang.Object

abstract class for caching files


Constructor Summary
CacheFile()
           
 
Method Summary
static java.lang.String getContentType(java.lang.Object o)
           
static java.lang.String getImageFormatName(java.lang.Object o)
           
static java.lang.String md5(byte[] bytes)
          rmd5 function
static void removeFromCache(java.lang.String uuid)
          remove object from cache by key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheFile

public CacheFile()
Method Detail

removeFromCache

public static void removeFromCache(java.lang.String uuid)
remove object from cache by key

Parameters:
uuid - key with which object is located in the cache

getContentType

public static java.lang.String getContentType(java.lang.Object o)
Parameters:
o - object
Returns:
if object is image return content type otherwise null

getImageFormatName

public static java.lang.String getImageFormatName(java.lang.Object o)
Parameters:
o - object
Returns:
return image format (png, jpg ...)

md5

public static java.lang.String md5(byte[] bytes)
rmd5 function

Parameters:
bytes - byte array
Returns:
hash string of this byte array