org.apache.jetspeed.cache.disk
Interface DiskCacheEntry

All Known Implementing Classes:
JetspeedDiskCacheEntry

public interface DiskCacheEntry

Interface for a DiskCacheEntry.

Version:
$Id: DiskCacheEntry.java,v 1.9 2004/02/23 02:45:29 jford Exp $
Author:
Kevin A. Burton

Method Summary
 java.lang.String getData()
          Get the contents/data of this URL
 long getExpirationTime()
          Get the expiration time of this DiskCacheEntry
 java.io.File getFile()
          Deprecated.  
 java.io.InputStream getInputStream()
          Get an InputStream for this Entry.
 long getLastModified()
          Get the lastModified date of this DiskCacheEntry
 java.io.Reader getReader()
          Get a Reader for this Entry.
 java.lang.String getSourceURL()
          Get the original URL this came from
 java.lang.String getURL()
          Get the URL that was cached.
 java.io.Writer getWriter()
          Get a Writer to update this Entry.
 boolean hasExpired()
          Test if the entry is expired
 boolean isLocal()
          Test if the entry is a Local (fake) disk cache entry
 void setExpirationTime(long time)
          Set the expiration time of this DiskCacheEntry
 void setLastModified(long time)
          Set the lastModified date of this DiskCacheEntry
 

Method Detail

getURL

public java.lang.String getURL()
Get the URL that was cached.


getSourceURL

public java.lang.String getSourceURL()
Get the original URL this came from


getFile

public java.io.File getFile()
Deprecated.  

Get a File which is representative of this item in the cache


getData

public java.lang.String getData()
                         throws java.io.IOException
Get the contents/data of this URL

Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get an InputStream for this Entry.

Throws:
java.io.IOException

getReader

public java.io.Reader getReader()
                         throws java.io.IOException
Get a Reader for this Entry. It should take into account the character encoding.

Throws:
java.io.IOException

getWriter

public java.io.Writer getWriter()
                         throws java.io.IOException
Get a Writer to update this Entry. It should take into account the character encoding. It will throw an exception if the entry is not writable

Throws:
java.io.IOException

getLastModified

public long getLastModified()
Get the lastModified date of this DiskCacheEntry


setLastModified

public void setLastModified(long time)
Set the lastModified date of this DiskCacheEntry


getExpirationTime

public long getExpirationTime()
Get the expiration time of this DiskCacheEntry


setExpirationTime

public void setExpirationTime(long time)
Set the expiration time of this DiskCacheEntry


hasExpired

public boolean hasExpired()
Test if the entry is expired


isLocal

public boolean isLocal()
Test if the entry is a Local (fake) disk cache entry



Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.