Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * Created on : 04.2003
  * Created by : s3595
  */
 package at.spardat.xma.boot.cache;
 
 import java.net.URL;

interface to storage module resources

Author(s):
s3595 Chr. Sch�fer (CGS)
Version:
$Id: IFileCacheResource.java 2084 2007-11-27 14:53:31Z s3460 $
 
 public interface IFileCacheResource {
    
Returns the remote location this entry caches.
 
     public abstract URL getLocation();

    
get an url to the local resource
 
     public abstract URL getLocalRes();

    
Returns a buffered output stream open for writing to the cache file.
 
     /* public abstract OutputStream getOutputStream( ) throws IOException ; */

    
Gets an input stream from this resource

Returns:
InputStream returns an input-stream for this resource, to read from.
 
     public abstract InputStream getInputStream() throws IOException;

    
Returns the time in the local system clock that the file was most recently checked for an update by this client machine.
info:

This is not a http-header information. It is only used bye the client to remember the date/time when this resource was checked for existing updates.

Returns:
long last update timestamp
 
     public abstract long getLastUpdated();

    
Sets the time in the local system clock that the file was most recently checked for an update.

Parameters:
updatedTime update time to set
 
     // public abstract void setLastUpdated(long updatedTime);
 
    
Last-Modified is the http-header value used to check, if a resource is still up to date.

Returns:
long last modified date
 
     public abstract long getLastModified();

    

Parameters:
lastModified
Returns:
void
 
     // public abstract void setLastModified(long lastModified );
 
    
Returns the value of the specified key, or null if the key does not exist.

Parameters:
key key to look for
 
     public abstract String getProperty(String key);

    
Returns the value of the specified key, or the default value if the key does not exist.
 
     public abstract String getProperty(String keyString defaultValue) ;

    
Sets the value for the specified key.

Returns:
the previous value
    public abstract Object setProperty(String keyString value) ;

    
Sets the expiration date of this resource.

Parameters:
l expiration date/time
Returns:
void
    public abstract void setExpiration(long l);

    
Gets the expiration date of this resource.

Returns:
the expiration date in milliseconds since 1.1.1970
    public abstract long getExpiration();

    
Sets the named property to the given value.

Parameters:
key name of the property
value of the property
    public abstract void setProperty(String keylong value);

    
is this resource still up to date

Returns:
true if it is already expired
    public abstract boolean isExpired();
New to GrepCode? Check out our FAQ X