public class URLSource
extends org.apache.excalibur.source.impl.AbstractSource
Modifier and Type | Field and Description |
---|---|
protected org.apache.excalibur.source.SourceParameters |
requestProperties
The
SourceParameters used in the url connection request properties |
Constructor and Description |
---|
URLSource(java.net.URL url)
Construct a new object
|
Modifier and Type | Method and Description |
---|---|
protected void |
addRequestProperties() |
boolean |
exists() |
long |
getContentLength()
Get the content length of the source or -1 if it
is not possible to determine the length.
|
protected void |
getInfos()
Get the last modification date and content length of the source.
|
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.
|
java.lang.String |
getSystemId()
Return the unique identifer for this source
|
protected boolean |
isHTMLContent() |
void |
recycle() |
void |
refresh()
Refresh this object and update the last modified date
and content length.
|
void |
setPostParameters(org.apache.excalibur.source.SourceParameters pars)
Set the post parameters
|
void |
setRequestProperties(org.apache.excalibur.source.SourceParameters pars)
Set the request parameters
|
java.lang.String |
toSAX(java.lang.Object toSaxObject) |
protected org.apache.excalibur.source.SourceParameters requestProperties
SourceParameters
used in the url connection request propertiespublic URLSource(java.net.URL url) throws java.io.IOException
java.io.IOException
public boolean exists()
protected boolean isHTMLContent()
protected void getInfos()
getInfos
in class org.apache.excalibur.source.impl.AbstractSource
public long getLastModified()
getLastModified
in interface org.apache.excalibur.source.Source
getLastModified
in class org.apache.excalibur.source.impl.AbstractSource
public long getContentLength()
getContentLength
in interface org.apache.excalibur.source.Source
getContentLength
in class org.apache.excalibur.source.impl.AbstractSource
public java.io.InputStream getInputStream() throws java.io.IOException, org.apache.excalibur.source.SourceException
InputStream
object to read from the source.getInputStream
in interface org.apache.excalibur.source.Source
getInputStream
in class org.apache.excalibur.source.impl.AbstractSource
org.apache.cocoon.ResourceNotFoundException
- if file not found or
HTTP location does not exist.java.io.IOException
- if I/O error occured.org.apache.excalibur.source.SourceException
public java.lang.String getSystemId()
public void refresh()
refresh
in interface org.apache.excalibur.source.Source
refresh
in class org.apache.excalibur.source.impl.AbstractSource
public void recycle()
public void setPostParameters(org.apache.excalibur.source.SourceParameters pars)
public void setRequestProperties(org.apache.excalibur.source.SourceParameters pars)
protected void addRequestProperties()
public java.lang.String toSAX(java.lang.Object toSaxObject)
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.