DODS 5.1 API

com.lutris.classloader
Class LocalZipResource

java.lang.Object
  |
  +--com.lutris.classloader.Resource
        |
        +--com.lutris.classloader.LocalZipResource

public class LocalZipResource
extends Resource

A Resource that is an entry in a specified zip file on the local machine. The zip file is represented by a ClassPathEntry, and the filename is specified by a String.

Version:
$Revision : 1.1 $
Author:
Kristen Pol, Lutris Technologies
See Also:
ClassPathEntry, Resource, ZipFile, ZipEntry

Field Summary
 
Fields inherited from class com.lutris.classloader.Resource
lastModifiedTime, location, logger, loggingEnabled, logLevel, name, size
 
Constructor Summary
protected LocalZipResource(java.lang.String name, ClassPathEntry location, org.apache.log4j.Logger loadLogger)
          Constructs local zip file resource with specified name and location.
 
Method Summary
 long getCurrentLastModifiedTime()
          Get current last-modification time of resource.
 java.io.InputStream getInputStream()
          Gets input stream representing resource.
 
Methods inherited from class com.lutris.classloader.Resource
equals, getBytes, getLastModifiedTime, getLocation, getName, getSize, getTime, hasBeenModified, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalZipResource

protected LocalZipResource(java.lang.String name,
                           ClassPathEntry location,
                           org.apache.log4j.Logger loadLogger)
                    throws java.io.FileNotFoundException
Constructs local zip file resource with specified name and location.

Parameters:
name - The file name of the resource.
location - The location of the resource.
Throws:
java.io.FileNotFoundException - if the desired file does not exist or does not have read permission.
See Also:
Resource, ClassPathEntry
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Gets input stream representing resource.

Specified by:
getInputStream in class Resource
Returns:
the input stream that represents the resource.
Throws:
java.io.IOException - if the input stream can not be constructed.
See Also:
InputStream

getCurrentLastModifiedTime

public long getCurrentLastModifiedTime()
                                throws java.io.FileNotFoundException
Get current last-modification time of resource. This is the time on the disk file the resource is associated with.

Specified by:
getCurrentLastModifiedTime in class Resource
Returns:
the last-modified time of the permanent copy of the resource in milliseconds.
java.io.FileNotFoundException

DODS 5.1 API