Class Resource


  • final class Resource
    extends java.lang.Object
    Helper class for VFSClassLoader. This represents a resource loaded with the classloader.
    See Also:
    VFSClassLoader
    • Field Detail

      • packageFolder

        private final FileObject packageFolder
      • packageName

        private final java.lang.String packageName
    • Method Detail

      • getPackageName

        public java.lang.String getPackageName()
        Returns the name of the package containing the resource.
      • getPackageAttribute

        public java.lang.String getPackageAttribute​(java.util.jar.Attributes.Name attrName)
                                             throws FileSystemException
        Returns an attribute of the package containing the resource.
        Throws:
        FileSystemException
      • getPackageFolder

        public FileObject getPackageFolder()
        Returns the folder for the package containing the resource.
      • getFileObject

        public FileObject getFileObject()
        Returns the FileObject of the resource.
      • getBytes

        public byte[] getBytes()
                        throws java.io.IOException
        Returns the data for this resource as a byte array.
        Throws:
        java.io.IOException