Class JarFileObject
- java.lang.Object
-
- org.apache.commons.vfs2.provider.AbstractFileObject<ZipFileSystem>
-
- org.apache.commons.vfs2.provider.zip.ZipFileObject
-
- org.apache.commons.vfs2.provider.jar.JarFileObject
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Comparable<FileObject>
,java.lang.Iterable<FileObject>
,FileObject
public class JarFileObject extends ZipFileObject
A file in a Jar file system.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.jar.Attributes
attributes
private JarFileSystem
fs
-
Fields inherited from class org.apache.commons.vfs2.provider.zip.ZipFileObject
entry
-
Fields inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
DEFAULT_BUFFER_SIZE
-
Fields inherited from interface org.apache.commons.vfs2.FileObject
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JarFileObject(AbstractFileName name, java.util.zip.ZipEntry entry, JarFileSystem fs, boolean zipExists)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addAll(java.util.jar.Attributes src, java.util.Map<java.lang.String,java.lang.Object> dest)
Adds the source attributes to the destination map.protected java.util.Map<java.lang.String,java.lang.Object>
doGetAttributes()
Returns the value of an attribute.protected java.security.cert.Certificate[]
doGetCertificates()
Return the certificates of this JarEntry.(package private) java.util.jar.Attributes
getAttributes()
Returns the attributes of this file.(package private) java.util.jar.Manifest
getManifest()
Returns the Jar manifest.-
Methods inherited from class org.apache.commons.vfs2.provider.zip.ZipFileObject
attachChild, doAttach, doDetach, doGetContentSize, doGetInputStream, doGetLastModifiedTime, doGetType, doListChildren, isWriteable, setZipEntry
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doCreateFileContent, doCreateFolder, doDelete, doGetInputStream, doGetOutputStream, doGetRandomAccessContent, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsSymbolicLink, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isSymbolicLink, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toString
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.vfs2.FileObject
getPath, getURI
-
-
-
-
Field Detail
-
fs
private final JarFileSystem fs
-
attributes
private java.util.jar.Attributes attributes
-
-
Constructor Detail
-
JarFileObject
protected JarFileObject(AbstractFileName name, java.util.zip.ZipEntry entry, JarFileSystem fs, boolean zipExists) throws FileSystemException
- Throws:
FileSystemException
-
-
Method Detail
-
getManifest
java.util.jar.Manifest getManifest() throws java.io.IOException
Returns the Jar manifest.- Throws:
java.io.IOException
-
getAttributes
java.util.jar.Attributes getAttributes() throws java.io.IOException
Returns the attributes of this file.- Throws:
java.io.IOException
-
doGetAttributes
protected java.util.Map<java.lang.String,java.lang.Object> doGetAttributes() throws java.lang.Exception
Returns the value of an attribute.- Overrides:
doGetAttributes
in classAbstractFileObject<ZipFileSystem>
- Returns:
- The attributes of the file.
- Throws:
java.lang.Exception
- if an error occurs.
-
addAll
private void addAll(java.util.jar.Attributes src, java.util.Map<java.lang.String,java.lang.Object> dest)
Adds the source attributes to the destination map.
-
doGetCertificates
protected java.security.cert.Certificate[] doGetCertificates()
Return the certificates of this JarEntry.- Overrides:
doGetCertificates
in classAbstractFileObject<ZipFileSystem>
- Returns:
- The certificates used to sign the file.
-
-