org.codehaus.plexus.components.io.resources
Class PlexusIoURLResource

java.lang.Object
  extended by org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource
      extended by org.codehaus.plexus.components.io.resources.PlexusIoURLResource
All Implemented Interfaces:
FileInfo, PlexusIoResource

public class PlexusIoURLResource
extends AbstractPlexusIoResource


Field Summary
 
Fields inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResource
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE
 
Constructor Summary
PlexusIoURLResource()
           
 
Method Summary
 InputStream getContents()
          Creates an InputStream, which may be used to read the files contents.
 URL getURL()
          Returns an URL, which may be used to reference the resource, if possible.
 void setURL(URL pUrl)
           
 
Methods inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource
getLastModified, getName, getSize, isDirectory, isExisting, isFile, setDirectory, setExisting, setFile, setLastModified, setName, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlexusIoURLResource

public PlexusIoURLResource()
Method Detail

getContents

public InputStream getContents()
                        throws IOException
Description copied from interface: FileInfo
Creates an 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.

Throws:
IOException

getURL

public URL getURL()
           throws IOException
Description copied from interface: PlexusIoResource
Returns an URL, which may be used to reference the resource, if possible.

Returns:
An URL referencing the resource, if possible, or null. In the latter case, you are forced to use #getInputStream().
Throws:
IOException

setURL

public void setURL(URL pUrl)


Copyright © 2001-2012 Codehaus. All Rights Reserved.