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