public class PlexusIoProxyResourceWithAttributes extends AbstractPlexusIoResourceWithAttributes
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE
Constructor and Description |
---|
PlexusIoProxyResourceWithAttributes(PlexusIoResource plexusIoResource,
PlexusIoResourceAttributes attrs) |
PlexusIoProxyResourceWithAttributes(PlexusIoResourceWithAttributes 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.
|
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. |
getAttributes, setAttributes
getName, setDirectory, setExisting, setFile, setLastModified, setName, setSize
public PlexusIoProxyResourceWithAttributes(PlexusIoResourceWithAttributes plexusIoResource)
public PlexusIoProxyResourceWithAttributes(PlexusIoResource plexusIoResource, PlexusIoResourceAttributes attrs)
public long getLastModified()
PlexusIoResource
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
.getLastModified
in interface PlexusIoResource
getLastModified
in class AbstractPlexusIoResource
File.lastModified()
public long getSize()
PlexusIoResource
PlexusIoResource.UNKNOWN_RESOURCE_SIZE
.getSize
in interface PlexusIoResource
getSize
in class AbstractPlexusIoResource
public boolean isDirectory()
FileInfo
FileInfo
refers to a directory.isDirectory
in interface FileInfo
isDirectory
in class AbstractPlexusIoResource
public boolean isExisting()
PlexusIoResource
isExisting
in interface PlexusIoResource
isExisting
in class AbstractPlexusIoResource
public boolean isFile()
FileInfo
FileInfo
refers to a file.isFile
in interface FileInfo
isFile
in class AbstractPlexusIoResource
public URL getURL() throws IOException
PlexusIoResource
URL
, which may be used to reference the
resource, if possible.#getInputStream()
.IOException
public InputStream getContents() throws IOException
FileInfo
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.IOException
Copyright © 2001-2013 Codehaus. All Rights Reserved.