vqServer API Class vq.server.CacheEntry

java.lang.Object
    |
    +----vq.utils.klentry
            |
            +----vq.server.CacheEntry
Contents
Package index
Package
API index

public class CacheEntry
extends klentry
Represents an entry in vqServer's internal file cache. The path separator is always / irrespective of platform. Similar in usage to java.io.File but there is no public constructor. Use Cache.get(String fileName) or Cache.get(String archive, String entry) to obtain a CacheEntry when you need to use it; these methods create and/or update the CacheEntry if necessary. Information and data provided by a CacheEntry can be stale by up to console.getCacheTimeout().


Method Index

 o exists()
Returns true if the drive, directory, file or archive entry represented by the CacheEntry exists.
 o getData()
Returns the contents of the file represented by the CacheEntry as a byte[].
 o getInputStream()
Returns an input stream for reading from the file or archive entry represented by the CacheEntry.
 o isFile()
Returns true if the entity represented by the CacheEntry is a file.
 o kill()
Don't call this method.
 o lastModified()
Returns the date and time the entity represented by the CacheEntry was last modified (as the number of milliseconds since....) or zero if the entry is not a file.
 o length()
Returns length of the file or archive entry represented by the CacheEntry in bytes or zero if the entry is not a file.

Method Detail

 o kill
public void kill()
          Don't call this method. It will disrupt the cache.
Overrides:
kill in class klentry
 o getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
          Returns an input stream for reading from the file or archive entry represented by the CacheEntry.
 o getData
public byte[] getData()
          Returns the contents of the file represented by the CacheEntry as a byte[].
 o exists
public boolean exists()
          Returns true if the drive, directory, file or archive entry represented by the CacheEntry exists.
 o lastModified
public long lastModified()
          Returns the date and time the entity represented by the CacheEntry was last modified (as the number of milliseconds since....) or zero if the entry is not a file. For archive entries, returns the date and time the archive was last modified.
 o isFile
public boolean isFile()
          Returns true if the entity represented by the CacheEntry is a file.
 o length
public long length()
          Returns length of the file or archive entry represented by the CacheEntry in bytes or zero if the entry is not a file.


vqServer API version 1.9. vqServer and the vqServer API are copyright © Steve Shering and vqSoft 1997-2000. Last updated 15 May 2000.

Contents
Package index
Package
API index