public class PlexusIoProxyResource extends Object implements PlexusIoResource
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
PlexusIoProxyResource(PlexusIoResource plexusIoResource) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getContents()
Creates an
InputStream, which may be used to read
the files contents. |
long |
getLastModified()
Returns the date, when the resource was last modified, if known.
|
String |
getName()
Returns the resources name, which may include path components,
like directory names, or something like that.
|
long |
getSize()
Returns the resources size, if known.
|
URL |
getURL()
Returns an
URL, which may be used to reference the
resource, if possible. |
boolean |
isDirectory()
Returns, whether the
FileInfo refers to a directory. |
boolean |
isExisting()
Returns, whether the resource exists.
|
boolean |
isFile()
Returns, whether the
FileInfo refers to a file. |
boolean |
isSymbolicLink()
Returns, whether the
FileInfo refers to a symlink. |
protected PlexusIoProxyResource(@Nonnull
PlexusIoResource plexusIoResource)
public long getLastModified()
PlexusIoResourcePlexusIoResource.UNKNOWN_MODIFICATION_DATE.getLastModified in interface PlexusIoResourceFile.lastModified()public long getSize()
PlexusIoResourcePlexusIoResource.UNKNOWN_RESOURCE_SIZE.getSize in interface PlexusIoResourcepublic boolean isDirectory()
PlexusIoResourceFileInfo refers to a directory.isDirectory in interface FileInfoisDirectory in interface PlexusIoResourcepublic boolean isExisting()
PlexusIoResourceisExisting in interface PlexusIoResourcepublic boolean isFile()
PlexusIoResourceFileInfo refers to a file.isFile in interface FileInfoisFile in interface PlexusIoResourcepublic URL getURL() throws IOException
PlexusIoResourceURL, which may be used to reference the
resource, if possible.getURL in interface PlexusIoResourcePlexusIoResource.getContents().IOException@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+).getContents in interface FileInfogetContents in interface PlexusIoResourceIOExceptionpublic String getName()
FileInfoFile.pathSeparatorpublic boolean isSymbolicLink()
FileInfoFileInfo refers to a symlink.
This method will return "false" for java versions prior to java7.isSymbolicLink in interface FileInfoCopyright © 2001-2014 Codehaus. All Rights Reserved.