|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.plexus.components.io.resources.PlexusIoFileResource
Implementation of PlexusIoResource for files.
| Field Summary |
| Fields inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResource |
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE |
| Constructor Summary | |
PlexusIoFileResource()
Creates a new instance. |
|
PlexusIoFileResource(java.io.File file)
Creates a new instance. |
|
PlexusIoFileResource(java.io.File file,
PlexusIoResourceAttributes attrs)
Creates a new instance. |
|
PlexusIoFileResource(java.io.File file,
java.lang.String name)
Creates a new instance. |
|
PlexusIoFileResource(java.io.File file,
java.lang.String name,
PlexusIoResourceAttributes attrs)
|
|
| Method Summary | |
PlexusIoResourceAttributes |
getAttributes()
|
java.io.InputStream |
getContents()
Creates an InputStream, which may be used to read
the files contents. |
java.io.File |
getFile()
Returns the resources file. |
long |
getLastModified()
Returns the date, when the resource was last modified, if known. |
java.lang.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. |
java.net.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. |
void |
setAttributes(PlexusIoResourceAttributes attributes)
|
void |
setFile(java.io.File file)
Sets the resources file. |
void |
setName(java.lang.String name)
Sets the resources name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PlexusIoFileResource()
public PlexusIoFileResource(java.io.File file)
public PlexusIoFileResource(java.io.File file,
PlexusIoResourceAttributes attrs)
public PlexusIoFileResource(java.io.File file,
java.lang.String name)
public PlexusIoFileResource(java.io.File file,
java.lang.String name,
PlexusIoResourceAttributes attrs)
| Method Detail |
public void setFile(java.io.File file)
public java.io.File getFile()
public void setName(java.lang.String name)
public java.lang.String getName()
FileInfoFile.pathSeparator
getName in interface FileInfopublic long getLastModified()
PlexusIoResourcePlexusIoResource.UNKNOWN_MODIFICATION_DATE.
getLastModified in interface PlexusIoResourceFile.lastModified()public boolean isFile()
FileInfoFileInfo refers to a file.
isFile in interface FileInfopublic boolean isDirectory()
FileInfoFileInfo refers to a directory.
isDirectory in interface FileInfopublic boolean isExisting()
PlexusIoResource
isExisting in interface PlexusIoResourcepublic long getSize()
PlexusIoResourcePlexusIoResource.UNKNOWN_RESOURCE_SIZE.
getSize in interface PlexusIoResource
public java.io.InputStream getContents()
throws java.io.IOException
FileInfoInputStream, 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.
getContents in interface FileInfojava.io.IOException
public java.net.URL getURL()
throws java.io.IOException
PlexusIoResourceURL, which may be used to reference the
resource, if possible.
getURL in interface PlexusIoResource#getInputStream().
java.io.IOExceptionpublic PlexusIoResourceAttributes getAttributes()
getAttributes in interface PlexusIoResourceWithAttributespublic void setAttributes(PlexusIoResourceAttributes attributes)
setAttributes in interface PlexusIoResourceWithAttributes
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||