org.apache.tapestry.asset
Class CachedAsset

java.lang.Object
  extended by org.apache.tapestry.asset.CachedAsset

public class CachedAsset
extends Object

Wrapper around cached asset resource.

Author:
jkuhnert

Constructor Summary
CachedAsset(String path, long lastModified, byte[] data, byte[] gzipData)
          Creates a new cachable asset entry.
 
Method Summary
 void clear(long lastModified)
          Clears the currently cached data and resets the last modified time.
 boolean equals(Object obj)
          
 byte[] getData()
           
 byte[] getGzipData()
           
 long getLastModified()
           
 String getPath()
           
 int hashCode()
          
 void setData(byte[] data)
           
 void setGzipData(byte[] gzipData)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachedAsset

public CachedAsset(String path,
                   long lastModified,
                   byte[] data,
                   byte[] gzipData)
Creates a new cachable asset entry.

Parameters:
path - The path string of the resource.
lastModified - The last known modification time of the data this cached object represents. Is used to invalidate cache entries.
data - The data representation to cache.
gzipData - The optional gzip'ed data.
Method Detail

getData

public byte[] getData()
Returns:
Returns the data.

setData

public void setData(byte[] data)
Parameters:
data - The data to set.

getGzipData

public byte[] getGzipData()
Returns:
Returns the gzipData.

setGzipData

public void setGzipData(byte[] gzipData)
Parameters:
gzipData - The gzipData to set.

getPath

public String getPath()
Returns:
Returns the path.

getLastModified

public long getLastModified()
Returns:
Returns the lastModified.

clear

public void clear(long lastModified)
Clears the currently cached data and resets the last modified time.

Parameters:
lastModified - The lastModified to set.

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.