public abstract class PlexusIoURLResource extends AbstractPlexusIoResource
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
PlexusIoURLResource(java.lang.String name,
long lastModified,
long size,
boolean isFile,
boolean isDirectory,
boolean isExisting) |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getContents()
Creates an
InputStream, which may be used to read
the files contents. |
java.lang.String |
getDescriptionForError(java.net.URL url) |
abstract java.net.URL |
getURL()
Returns an
URL, which may be used to reference the
resource, if possible. |
getLastModified, getName, getSize, isDirectory, isExisting, isFile, isSymbolicLinkprotected PlexusIoURLResource(@Nonnull
java.lang.String name,
long lastModified,
long size,
boolean isFile,
boolean isDirectory,
boolean isExisting)
@Nonnull
public java.io.InputStream getContents()
throws java.io.IOException
PlexusIoResourceInputStream, 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+).java.io.IOExceptionpublic java.lang.String getDescriptionForError(java.net.URL url)
public abstract java.net.URL getURL()
throws java.io.IOException
PlexusIoResourceURL, which may be used to reference the
resource, if possible.PlexusIoResource.getContents().java.io.IOException