Class JarArchive
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
VASSAL.tools.DataArchive
VASSAL.tools.JarArchive
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
FieldsFields inherited from class DataArchive
archive, cachedLocalImages, extensions, ICON_DIR, IMAGE_DIR, imageDir, localImages, SOUND_DIR, soundDirModifier and TypeFieldDescriptionprotected FileArchiveprotected List<DataArchive> static final Stringstatic final Stringprotected Stringstatic final Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetAbsolutePath(String file) getInputStream(String fileName) Get anInputStreamfor the given file in the archive.getName()Returns a URL pointing to the named file.Methods inherited from class DataArchive
addExtension, buildLocalizedDirectoryList, close, contains, contains, findClass, getAllLocalImageNames, getAllLocalImageNamesForDirectory, getArchive, getCachedAudioClip, getImageNames, getImageNameSet, getImageNameSet, getImageNamesRecursively, getImageNamesRecursively, getImagePrefix, getLocalImageNames, getPermissions, getURL, getWriter, loadClassModifier and TypeMethodDescriptionvoidaddExtension(DataArchive ext) DataArchives can extend other archives.protected voidvoidclose()booleanbooleanprotected Class<?> getAllLocalImageNames(boolean localized, boolean fullPath) protected voidgetAllLocalImageNamesForDirectory(SortedSet<String> s, String directory, boolean fullPath) getCachedAudioClip(String name) String[]getImageNameSet(boolean localized, boolean fullPath) protected voidprotected voidgetImageNamesRecursively(SortedSet<String> s, boolean localized, boolean fullPath) protected PermissionCollectiongetPermissions(CodeSource codesource) getURL()Returns a URL pointing to the archive.Return the writeable instance of DataArchive, either this or one of its extensions.Class<?> //////////////////////////////////////////////////////////////////Methods inherited from class SecureClassLoader
defineClass, defineClassMethods inherited from class ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
prefix
-
-
Constructor Details
-
JarArchive
public JarArchive() -
JarArchive
-
-
Method Details
-
getURL
Description copied from class:DataArchiveReturns a URL pointing to the named file.- Overrides:
getURLin classDataArchive- Parameters:
fileName- the name of the file- Returns:
- a URL corresponding to the file
- Throws:
IOException- if some other problem occurs
-
getInputStream
Description copied from class:DataArchiveGet anInputStreamfor the given file in the archive.- Overrides:
getInputStreamin classDataArchive- Parameters:
fileName- the name of the file- Returns:
- an
InputStreamwhich contains the file - Throws:
IOException- if there is a problem reading the file
-
getAbsolutePath
-
getName
- Overrides:
getNamein classDataArchive
-