Interface WebResource

    • Method Detail

      • getLastModifiedHttp

        String getLastModifiedHttp()
        the last modified time of this resource in the correct format for the HTTP Last-Modified header as specified by RFC 2616.
      • isVirtual

        boolean isVirtual()
        Indicates if this resource is required for applications to correctly scan the file structure but that does not exist in either the main or any additional WebResourceSet. For example, if an external directory is mapped to /WEB-INF/lib in an otherwise empty web application, /WEB-INF will be represented as a virtual resource.
        true for a virtual resource
      • getContentLength

        long getContentLength()
      • getWebappPath

        String getWebappPath()
        The path of this resource relative to the web application root. If the resource is a directory, the return value will end in '/'.
      • getETag

        String getETag()
        Return the strong ETag if available (currently not supported) else return the weak ETag calculated from the content length and last modified.
        The ETag for this resource
      • setMimeType

        void setMimeType​(String mimeType)
        Set the MIME type for this Resource.
        mimeType - The mime type that will be associated with the resource
      • getMimeType

        String getMimeType()
        the MIME type for this Resource.
      • getInputStream

        InputStream getInputStream()
        Obtain an InputStream based on the contents of this resource.
        An InputStream based on the contents of this resource or null if the resource does not exist or does not represent a file
      • getContent

        byte[] getContent()
        the binary content of this resource or null if it is not available in a byte[] because, for example, it is too big.
      • getCreation

        long getCreation()
        The time the file was created. If not available, the result of getLastModified() will be returned.
      • getURL

        URL getURL()
        a URL to access the resource or null if no such URL is available or if the resource does not exist.
      • getCodeBase

        URL getCodeBase()
        the code base for this resource that will be used when looking up the assigned permissions for the code base in the security policy file when running under a security manager.
      • getWebResourceRoot

        WebResourceRoot getWebResourceRoot()
        a reference to the WebResourceRoot of which this WebResource is a part.