org.xerial.util
Class FileResource.FileInJarArchive

java.lang.Object
  extended by org.xerial.util.FileResource.FileInJarArchive
All Implemented Interfaces:
VirtualFile
Enclosing class:
FileResource

public static class FileResource.FileInJarArchive
extends Object
implements VirtualFile

A virtual file implementation for file resources contained in a JAR file

Author:
leo

Constructor Summary
FileResource.FileInJarArchive(URL resourceURL, String logicalPath, boolean isDirectory)
           
 
Method Summary
 String getLogicalPath()
          Gets the logical path of the file.
 URL getURL()
          Gets the URL of this file
 boolean isDirectory()
          is directory?
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileResource.FileInJarArchive

public FileResource.FileInJarArchive(URL resourceURL,
                                     String logicalPath,
                                     boolean isDirectory)
Method Detail

getLogicalPath

public String getLogicalPath()
Description copied from interface: VirtualFile
Gets the logical path of the file. For example, if this VirtualFile' URL is "file:/somewhere/org/xerial/util/FileResource.java", its logical name is org/xerial/util/FileResource.java, beginning from the root package.

Specified by:
getLogicalPath in interface VirtualFile
Returns:

getURL

public URL getURL()
Description copied from interface: VirtualFile
Gets the URL of this file

Specified by:
getURL in interface VirtualFile
Returns:

isDirectory

public boolean isDirectory()
Description copied from interface: VirtualFile
is directory?

Specified by:
isDirectory in interface VirtualFile
Returns:
true when the file is a directory, otherwise false

toString

public String toString()
Specified by:
toString in interface VirtualFile
Overrides:
toString in class Object


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.