|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.excalibur.source.URLSource
Description of a source which is described by an URL.
Constructor Summary | |
URLSource(java.net.URL url,
SourceParameters parameters)
Construct a new object |
Method Summary | |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
|
void |
discardValidity()
Refresh this object and update the last modified date and content length. |
long |
getContentLength()
Get the content length of the source or -1 if it is not possible to determine the length. |
protected org.xml.sax.InputSource |
getInputSource()
Return a new InputSource object |
java.io.InputStream |
getInputStream()
Return an InputStream object to read from the source. |
long |
getLastModified()
Get the last modification date of the source or 0 if it is not possible to determine the date. |
Resource |
getResource()
Get the corresponding Resource object for monitoring. |
java.lang.String |
getSystemId()
Return the unique identifer for this source |
SourceValidity |
getValidity()
Get the Validity object. |
void |
toSAX(org.xml.sax.ContentHandler handler)
Stream content to a content handler or to an XMLConsumer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLSource(java.net.URL url, SourceParameters parameters) throws java.io.IOException
parameters
- This is optionalMethod Detail |
public void compose(org.apache.avalon.framework.component.ComponentManager manager)
compose
in interface org.apache.avalon.framework.component.Composable
public long getLastModified()
public Resource getResource() throws java.lang.Exception
getResource
in interface Monitorable
public long getContentLength()
public java.io.InputStream getInputStream() throws java.io.IOException
InputStream
object to read from the source.getInputStream
in interface Source
ResourceNotFoundException
- if file not found or
HTTP location does not exist.java.io.IOException
- if I/O error occured.public java.lang.String getSystemId()
getSystemId
in interface Source
public SourceValidity getValidity()
null
is returned.getValidity
in interface ModifiableSource
public void discardValidity()
discardValidity
in interface ModifiableSource
protected org.xml.sax.InputSource getInputSource() throws java.io.IOException
InputSource
objectjava.io.IOException
- if I/O error occured.public void toSAX(org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXException
toSAX
in interface XMLizable
ResourceNotFoundException
- if file not found or
HTTP location does not exist.org.xml.sax.SAXException
- if failed to parse source document.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |