Interface PlexusIoResource

    • Field Detail

      • UNKNOWN_RESOURCE_SIZE

        static final long UNKNOWN_RESOURCE_SIZE
        Unknown resource size.
        See Also:
        Constant Field Values
      • UNKNOWN_MODIFICATION_DATE

        static final long UNKNOWN_MODIFICATION_DATE
        Unknown modification date
        See Also:
        Constant Field Values
    • Method Detail

      • isExisting

        boolean isExisting()
        Returns, whether the resource exists.
      • isFile

        boolean isFile()
        Returns, whether the FileInfo refers to a file.
        Specified by:
        isFile in interface FileInfo
      • isDirectory

        boolean isDirectory()
        Returns, whether the FileInfo refers to a directory.
        Specified by:
        isDirectory in interface FileInfo
      • getContents

        @Nonnull
        InputStream getContents()
                         throws IOException
        Creates an InputStream, which may be used to read the files contents. This is useful, if the file selector comes to a decision based on the files contents. Please note that this InputStream is unbuffered. Clients should wrap this in a BufferedInputStream or attempt reading reasonably large chunks (8K+).
        Specified by:
        getContents in interface ContentSupplier
        Specified by:
        getContents in interface FileInfo
        Throws:
        IOException
      • getURL

        URL getURL()
            throws IOException
        Returns an URL, which may be used to reference the resource, if possible.
        Returns:
        An URL referencing the resource, if possible, or null. In the latter case, you are forced to use getContents().
        Throws:
        IOException